You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2002/01/14 10:40:14 UTC
DO NOT REPLY [Bug 5835] New: -
No DOM MutationEvents for changes of text data
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5835>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5835
No DOM MutationEvents for changes of text data
Summary: No DOM MutationEvents for changes of text data
Product: Xerces-J
Version: 1.4.4
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Major
Priority: Other
Component: DOM
AssignedTo: xerces-j-dev@xml.apache.org
ReportedBy: sag@stark-verlag.de
Hi again.
I'm still on DOM event usage, with Xerces 1.4.4.
After turning on DOM MutationEvents, the event handler attached to the
document node receives quite many events, but I do not get any ones
reflecting changes within text nodes.
Debugging the methods involved, I see that at DocumentImpl line 1048 that the
MutationEvent created has a null value as target, whereas the DOM level 2
Events specification v1.0 says in section 1.6.4: "The target of this event
is the CharacterData node". Well, maybe that value is set afterwards. I did
not understand all functionality in the code called afterwards.
Finally I tried to register a non-capturing event-listener as well by adding
this line to my code:
((org.w3c.dom.events.EventTarget)n).addEventListener(org.apache.xerces.dom.e
vents.MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED, this, false);
.....and got the event!
But again the target of the event is the DeferredDocumentImpl (where I
attached my event listener) and not the text node that was changed.
- Why is the target wrong?
- Why do I have to use a non-capturing event listener to get this event,
while I am able to receive all others with capturing ones?
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org