Closed Bug 789088 Opened 12 years ago Closed 12 years ago

DOM methods are not defined on the correct object

Categories

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

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 390411

People

(Reporter: erik, Unassigned)

References

(Depends on 1 open bug)

Details

The spec defines appendChild (and others) on Node. assert(Node.prototype.appendChild) In Firefox different "subclasses" of Node implement these. For example Object.getOwnPropertyDescriptor(Text.prototype, 'appendChild'); Object.getOwnPropertyDescriptor(Element.prototype, 'appendChild'); what is worse is that every single DOM interface that implements Node redefines these. Object.getOwnPropertyDescriptor(Element.prototype, 'appendChild'); Object.getOwnPropertyDescriptor(HTMLElement.prototype, 'appendChild'); Object.getOwnPropertyDescriptor(HTMLBodyElement.prototype, 'appendChild'); and these are not reflected as the same function object assert(Element.prototype.appendChild === HTMLElement.prototype.appendChild) This can be manually fixed by doing something like: Node.prototype.appendChild = Element.prototype.appendChild; delete Element.prototype.appendChild; delete HTMLElement.prototype.appendChild; delete HTMLBodyElement.prototype.appendChild; ...
Yep, known and is fixed for the new bindings.
Depends on: ParisBindings
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.