Closed
Bug 825743
Opened 13 years ago
Closed 13 years ago
instanceof HTMLBodyElement is false for inserted HTMLBodyElement
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 824917
People
(Reporter: support, Unassigned)
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.45 Safari/537.17
Steps to reproduce:
Tested this extension code in Firefox Nightly 20.0a1
window.document.addEventListener("DOMContentLoaded", function(evt) {
if (evt.originalTarget instanceof HTMLDocument) {
evt.originalTarget.addEventListener("DOMNodeInserted", function(evti) {
if (evti.relatedNode.tagName == "BODY") {
dump("Node: " + evti.relatedNode);
dump(" / Test against instanceof HTMLBodyElement: "+ (evti.relatedNode instanceof HTMLBodyElement) +"\n");
}
}, true); }
}, true);
Actual results:
(evti.relatedNode instanceof HTMLBodyElement) was false for a HTMLBodyElement
Output:
Node: [object HTMLBodyElement] / Test against instanceof HTMLBodyElement: false
Expected results:
(evti.relatedNode instanceof HTMLBodyElement) should be true for a HTMLBodyElement
Output: (for example Firefox 17.0.1)
Node: [object HTMLBodyElement] / Test against instanceof HTMLBodyElement: true
Severity: normal → major
OS: Mac OS X → All
Hardware: x86 → All
Comment 1•13 years ago
|
||
Thanks for the report. This should be fixed in tomorrow's nightly.
Severity: major → normal
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Component: Untriaged → DOM
Product: Firefox → Core
Resolution: --- → DUPLICATE
![]() |
||
Comment 2•13 years ago
|
||
Note that per spec the code above should in fact test false. We might add a chrome-only spec violation, but that's what it would be: a spec violation....
Assignee | ||
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•