Re: DOMAttrModified not getting triggered
Boris Zbarsky <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.dom |
|---|---|
| Message-ID | <[email protected]> |
Sapna Natarajan wrote:
> I am looking for attribute modifications by attaching a listener to the
> DOMAttrModified event for the document. However, this seems to get
> triggered only when I use the string method "setAttribute" to modify an
> attribute, for example myNode.setAttribute('value', 'yy'). It does not
> get triggered when I use the expando dot notation to modify an
> attribute, say myNode.value = 'yy'.
The latter doesn't change the value attribute, if we're talking about
HTML <input>s. The value attribute corresponds to the defaultValue DOM
property, not the value DOM property.
> Is there any event that I can listen for to changes in the DOM
> attributes using the expando dot notation ?
Generally, no.
-Boris