DOMAttrModified视觉属性 [英] DOMAttrModified visual attributes
问题描述
我已经DOMAttrModified WebKit的工作有一些补丁,我想知道什么样的属性的变化会触发这个事件?例如,当我改变的innerHTML它不会触发。并且有一种简单的办法,我知道这直接这些属性
改变的用户界面。例如ID不直接,但间接它取决于id的值的JavaScript可以改变
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.
谢谢!
推荐答案
我相信调度此事件。 innerHTML的不是DOM属性,但相应的DOM节点的JavaScript对象上,而属性。作为一个经验法则,DOM属性可以添加/使用DOM的元素对象的setAttribute /的removeAttribute方法修饰/移除。
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.
这篇关于DOMAttrModified视觉属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!