Closed Bug 74218 Opened 23 years ago Closed 21 years ago

subtreeModified Mutation Event Needs Implemented

Categories

(Core :: DOM: Events, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla1.0.1

People

(Reporter: pbwiz, Assigned: aaronlev)

References

Details

SubtreeModified Mutation event needs implemented.

Jeff.
marking NEW.
Severity: normal → enhancement
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: other → All
Hardware: PC → All
Summary: subtreeModified Mutation Event Needs Implemented → [RFE] subtreeModified Mutation Event Needs Implemented
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.0
Target Milestone: mozilla1.0 → mozilla1.0.1
Priority: -- → P4
Priority: P4 → P3
*** Bug 149620 has been marked as a duplicate of this bug. ***
Summary: [RFE] subtreeModified Mutation Event Needs Implemented → subtreeModified Mutation Event Needs Implemented
Blocks: 149654
I have an impl for this in bug 149654, although it only fires on replaceChild().

Hyatt says that it should probably fire when nodes are removed/inserted too, but
I'm not sure.
checked in as part of fix for bug 149654
Assignee: hyatt → aaronl
Status: ASSIGNED → NEW
checked in as part of fix for bug 149654.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
I wish this bug could be REOPENED for the following reasons:
- attachment 28317 [details] from bug 72730 and attachment 121252 [details] from bug 149654 are
testcases which supposedly were testing the support for DOMSubtreeModified. As
far as I can say, attachment 121252 [details] never really tested the support for
DOMSubtreeModified while attachment 28317 [details] remains silent (no alert fired for  
DOMSubtreeModified)
- after careful reading and testing, I never was able to make this event fire in
an html document:
http://www10.brinkster.com/doctorunclear/HTMLJavascriptCSS/DOM2MutationEvents.html

Mozilla 1.8a2 build 2004060709 under XP Pro SP1a here.

- other currently active bugs related to DOMSubtreeModified involve XML, SVG or XBL

I can upload a reduced testcase
a) as soon as I get some kind of confirmation that the bug needs to be reopened and
b) as soon as I know if I should reopen this bug or open a new bug.
Agreed? Fair enough?

CC added: B. Zbarsky
This event was in fact implemented for replaceChild() operations (where it made
sense).  Now that replaceChild() simply does a removeChild() and insertBefore()
we once again don't fire these events.

As I have previously stated, however (in existing open bugs that you would do
well to search for), the DOM specification for DOMSubtreeModified is so utterly
unclear that I don't see any way to implement it in reasonable ways.  I feel
that any further work on DOMSubtreeModified is a complete waste of time and
effort until the DOM specification is clarified as to when the event should and
should not fire.

Please do not cc me on any bugs related to DOMSubtreeModified until such changes
have been made to the specification.

And no matter what, do not reopen this bug.  The issues you raise are covered by
existing open bugs, as I said.
I didn't know what specs you thought of, but according to DOM Events 2.0 or the
DOM Events 3.0 Working Draft I'm using I don't think DOMSubtreeModified is unclear:
"This is a general event for notification of all changes to the document. It can
be used instead of the more specific events listed below. [...]"
For me, this means, without any need to be clearified, that EVERY modification
of the subtree, including node replacement, removing/adding nodes, changing
attributes, ... should fire it. As said in the spec, it also should be fired
together with one of the events "listed below":
 - DOMNodeInserted
 - DOMNodeRemoved
 - DOMNodeRemovedFromDocument
 - DOMNodeInsertedInDocument
 - DOMAttrModified
 - DOMCharacterDataModified
I don't see any problems.

All quotations according to W3C Recommendation "DOM Level 2 Events". This bug
should be reopend, until the event is fired as said above.
I concurr.  I dont think the DOM2 Spec is unclear at all (A agree with Daniel 
Kraft's interpretation) and this bug needs to be fixed with similar timing to 
74219 and 74220.  Furthermore, the related bug 149620 was last modified 2003-
10-22 !   Is this not a good case to re-open and fix?  Test Cases will be one 
liners!
Anyone out there?  Or is there another bug out there that covers this that i 
dont know about?  

We are going to have to write and test in Konqueror otherwise ... I hear they 
have mutation events working...

I just wish my C++ was more practiced ... I would maybe jump in there and try 
to help out myself !   :-(
If this is working can someone update
http://www.mozilla.org/docs/dom/mozilla/bug-events.html
You need to log in before you can comment on or make changes to this bug.