Closed
Bug 1135801
Opened 9 years ago
Closed 6 years ago
[[Prototype]] of self.NodeFilter should be Object.prototype, not Function.prototype
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
INVALID
People
(Reporter: Ms2ger, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
1.40 KB,
patch
|
Details | Diff | Splinter Review |
Per <https://heycam.github.io/webidl/#interface-object>, after the first Note. Tested by dom/interfaces.html ("NodeFilter interface: existence and properties of interface object").
Comment 1•9 years ago
|
||
Um... this test doesn't test anything other than the value NodeFilter.__proto__? In particular, it seems to not test that typeof should be "object", that Object.prototype.toString.call(NodeFilter) should be "[object Object]", that NodeFilter.toString() should be "[object Object]", that NodeFilter should have no "length" property, etc. That said, what do browsers actually do here? Because it's not clear to me why this shouldn't just be a Function object, really...
Flags: needinfo?(cam)
Comment 2•9 years ago
|
||
Inheriting from Function.prototype for consistency with non-callback interface objects may make sense, but is NodeFilter as ES6-class-y as other interface objects? It's more just a storage place for some named constants. In terms of what browsers do currently: http://people.mozilla.org/~cmccormack/tests/callback-interface-proto.html Gecko: Function.prototype Blink: Function.prototype WebKit: Object.prototype IE11: Object.prototype
Flags: needinfo?(cam)
Comment 3•9 years ago
|
||
Note that in WebKit all DOM interface objects have Object.prototypw as their prototype....
Comment 4•9 years ago
|
||
Comment 5•6 years ago
|
||
The spec was changed in https://github.com/heycam/webidl/issues/96.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
Assignee | ||
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•