Re: DOMAttrModified not getting triggered
Sapna Natarajan <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.dom |
|---|---|
| Message-ID | <[email protected]> |
Thanks Boris. I am assuming the CharacterDataChanged in nsIMutationObserver works differently than the 'DOMCharacterDataModified' mutation event. Sapna Boris Zbarsky wrote: > carglue wrote: >> So when the JavaScript engine executes web page script, and the script >> sets some element properties dynamically, and Gecko is informed, and >> the CSS rules engine chimes in > > Hold on. Where do the CSS rules come into this? The example was > setting .value; that's transparent to CSS. > > But in general.... > >> and the content is reflowed by Gecko--during that entire sequence, >> there are no consumable notifications available via any API at all? > > Pretty much, yes. You can get invalidate events if something needs to > be repainted. But some changes just don't affect the DOM, hence fire no > DOM mutation events. > >> Does it make a difference if an XPCOM component is doing the listening, > > Yes; you might be able to detect events A C++ XPCOM component using > internal linkage can get certain notifications via nsIDocumentObserver > and nsIMutationObserver. In the setting .value case, the notification > will most likely be the CharacterDataChanged notification on the > anonymous textnode inside the input. > > -Boris