Closed
Bug 232009
Opened 21 years ago
Closed 3 years ago
Mutation events should fire after an attribute is removed
Categories
(Core :: DOM: Core & HTML, defect, P5)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
INACTIVE
People
(Reporter: sicking, Unassigned)
References
Details
Currently we fire a mutation-event before removing an attribute. This is wrong according to the DOM-spec, it says to fire all DOMAttrModified events after the attribute is modified. This should be easy to fix, the only thing to keep in mind is that we need to get the attribute-node before removing the attribute, otherwise it won't be there.
Reporter | ||
Comment 1•21 years ago
|
||
semi-related: We need some sort of mechanism for telling attribute-nodes that they are going away. Currently the attribute-node can be compleatly unaware that it no longer is an attribute on the element. One way to fix this is to every time we need to do something where that matters call mContent->HasAttr(mNodeInfo...). The problem is that that won't catch the case of the attribute being removed and then reinserted. However i'm not sure if that matters.
Comment 2•21 years ago
|
||
Note that the behavior for attr removal and element/pi/whatever removal is totally different (node removal events fire _before_ the node is removed). The two really should be treated symmetrically, since there is no substantive difference between attr nodes and other nodes..... imo this is a problem with the spec.
Reporter | ||
Comment 3•21 years ago
|
||
it's additionally interesting because we fire at least some of the child-insert event after the change has taken place :)
Reporter | ||
Comment 4•21 years ago
|
||
more fun: we're calling GetAttributeNode when we should call GetAttributeNodeNS to retrieve the relevant attributenode before firing off mutation-events
Updated•15 years ago
|
Assignee: general → nobody
QA Contact: ian → general
Comment 5•15 years ago
|
||
This should be fixed now.
Comment 6•6 years ago
|
||
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046 Move all DOM bugs that haven't been updated in more than 3 years and has no one currently assigned to P5. If you have questions, please contact :mdaly.
Priority: -- → P5
Assignee | ||
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
Updated•3 years ago
|
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INACTIVE
You need to log in
before you can comment on or make changes to this bug.
Description
•