i want handle in JavaScript HTML attribute value change. HTML attribute can be changed from another script, and i need handle it. Is better way then check value every second?
Asked
Active
Viewed 185 times
1
-
1There is a deprecated event type do to that: [`DOMSubtreeModified`](http://www.w3.org/TR/DOM-Level-3-Events/#event-type-DOMSubtreeModified) – Florent Jan 28 '14 at 17:31
-
1If you need to watch attributes, then I would suggest using a framework like AngularJS. You just set up a model (a variable) on the scope and Angular will watch it for you for changes. Then you can assign some function to run when that value changes. – SoluableNonagon Jan 28 '14 at 17:41
-
http://stackoverflow.com/questions/4561845/firing-event-on-dom-attribute-change – Zakaria Acharki Jan 13 '16 at 12:17