Closed Bug 998503 Opened 11 years ago Closed 11 years ago

MutationObserver not working correctly for the subtree option

Categories

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

28 Branch
x86
macOS
defect
Not set
major

Tracking

()

RESOLVED DUPLICATE of bug 902618

People

(Reporter: acr, Unassigned)

Details

Attachments

(1 file)

Attached file bug.html
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:28.0) Gecko/20100101 Firefox/28.0 (Beta/Release) Build ID: 20140314220517 Steps to reproduce: In theory, the subtree option of a MutationObserver should observe all nodes below the target node. That is not happening. It is happening in both Chrome and Safari, and per the spec at: http://lists.w3.org/Archives/Public/public-webapps/2011JulSep/1622.html We have "At any point, if a node becomes a descendant of |target|, it is synchronously added to the observed set". I have attached a minimal test case in one HTML file, please load in Firefox and you will see what I am taking about. Actual results: Console Printout in Firefox 28: BODY HEADER MAIN FOOTER Expected results: Console Printout in Safari 7: BODY HEADER UL LI LI LI LI MAIN P FOOTER DIV DIV TABLE DIV DIV STYLE STYLE LINK LINK
Severity: normal → major
Please ignore all the tags after FOOTER for the expected result. I just realized that Evernote is adding the additional DOM nodes that are reported.
Component: Untriaged → DOM
Product: Firefox → Core
Status: UNCONFIRMED → RESOLVED
Closed: 11 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.

Attachment

General

Created:
Updated:
Size: