DOMAttrModified visual attributes

不羁的心 提交于 2019-12-12 05:16:51

问题


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!


回答1:


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.



来源:https://stackoverflow.com/questions/7668882/domattrmodified-visual-attributes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!