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)
Core
DOM: Core & HTML
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)
| Reporter | ||
Comment 1•9 years ago
|
||
This applies to [[Get]] and [[GetOwnProperty]].
Comment 2•9 years ago
|
||
Yeah, looks like a bug. I think we might have tried to remain backwards compatible, but my memory is hazy.
Flags: needinfo?(peterv)
| Reporter | ||
Comment 3•9 years ago
|
||
I need to carefully double-check behavior for all our OverrideBuiltins interfaces in Safari to make sure we're not going to break sites...
| Reporter | ||
Comment 4•9 years ago
|
||
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.
| Reporter | ||
Comment 5•9 years ago
|
||
| Reporter | ||
Comment 6•9 years ago
|
||
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.
| Reporter | ||
Comment 7•9 years ago
|
||
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...
| Reporter | ||
Comment 8•9 years ago
|
||
Filed https://github.com/heycam/webidl/issues/152 to get this sorted out.
| Reporter | ||
Comment 9•9 years ago
|
||
Invalid per spec update in https://github.com/heycam/webidl/issues/152 and https://github.com/heycam/webidl/pull/174
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → INVALID
| Assignee | ||
Updated•7 years ago
|
Component: DOM → DOM: Core & HTML
Updated•5 years ago
|
Flags: needinfo?(cam)
You need to log in
before you can comment on or make changes to this bug.
Description
•