I do not think there is anything available for this.
Depending on your use case, you can easily create a wrapper so that your code uses the wrapper and notifies listeners that something has changed.
Something very simple:
function Wrapper() { var listeners = [] return { addListener: function(fn) { listeners.push(fn) }, removeListener: function(fn) { listeners.splice(listeners.indexOf(fn), 1)
What you can use as follows:
var wrapper = Wrapper() wrapper.addListener(function(prop, val) { // When you'll change a prop, it'll get there and you'll see // which property is changed to which value }) // This sets the property and notifies all the listeners wrapper.set(document.styleSheets[0].rules[0].style.backgroundImage, "url(myimage.png)")
Florian margaine
source share