Closed Bug 1297411 Opened 9 years ago Closed 9 years ago

named properties should shadow expando (own) props on [OverrideBuiltins] interfaces

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID
Tracking Status
firefox51 --- affected

People

(Reporter: bzbarsky, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

See discussion at bug 1297304 comment 3. Peter, Cameron, thoughts?
Flags: needinfo?(peterv)
Flags: needinfo?(cam)
This applies to [[Get]] and [[GetOwnProperty]].
Yeah, looks like a bug. I think we might have tried to remain backwards compatible, but my memory is hazy.
Flags: needinfo?(peterv)
I need to carefully double-check behavior for all our OverrideBuiltins interfaces in Safari to make sure we're not going to break sites...
Actually, we only need to check the ones that don't have a named creator, which means I can ignore DOMStringMap and only consider HTMLDocument and HTMLFormElement.
I started looking at our code for this and rememebered why it is we have the behavior we do. It makes it simple to not violate the ES invariants. This testcase shows that Safari totally violates them for <form> and document, and Blink violates them for <form>. For document it doesn't violate them, but that means that in practice sometimes the named prop shadows the expando prop and sometimes not, depending on whether the expando prop is defined as configurable. Given that, I think we should change http://heycam.github.io/webidl/#dfn-named-property-visibility by switching steps 4 and 5 (which basically aligns with Edge and our current impl), mark this bug invalid, and reopen bug 1297304.
The other option is to keep steps 4 and 5 in the current order, but change step 1 to consider all non-configurable properties or something; that's closer to what Blink does with document, I think...
Filed https://github.com/heycam/webidl/issues/152 to get this sorted out.
See Also: → 1297304
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → INVALID
Component: DOM → DOM: Core & HTML
Flags: needinfo?(cam)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: