Pergunta

I have DOMAttrModified working on webkit with some patches and I was wondering changing of what kind of attributes will trigger this event? For example, it does not trigger when I change innerHTML. And is there an easy way for me to know which of these attributes directly change user interface. For example id does not directly, but indirectly javascript could change it depending on the value of id.

Thanks!

Foi útil?

Solução

I believe the event is dispatched whenever a DOM attribute is modified. innerHTML is not a DOM attribute but rather a property on a JavaScript object corresponding to the DOM node. As a rule of a thumb, DOM attributes can be added/modified/removed using the setAttribute/removeAttribute methods on DOM element objects.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top