Closed Bug 789944 Opened 12 years ago Closed 7 years ago

DOM prototype objects don't have the right constructor

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: erik, Unassigned)

References

(Depends on 1 open bug)

Details

All other browsers return true for expressions like these:

HTMLDivElement.prototype.constructor === HTMLDivElement

Firefox returns true if you use Date, RegExp etc
OS: Mac OS X → All
Hardware: x86 → All
This works for WebIDL objects (e.g. XMLHttpRequest).  It'll work for HTMLDivElement once that's converted to WebIDL.
Depends on: ParisBindings
I think we could call this fixed now that all constructors are on WebIDL.
CSSRule.prototype.constructor == CSSRule still tests false.  It has a constructor; it just throws when called.
This is fixed for all spec-defined interfaces.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.