||View All MessagesBack to WebFX|
Yes, sorry I wasn't clear enough about the problem I tried to solve.|
On some pages it is possible to choose for different styles.In Mozilla you can activate those alternate stylesheets with view-->use style-->...
Now I wanted to detect that: i.e. if the user has chosen a different stylesheet with that menu option.
It seems I have been looking in the wrong direction.
I should use the watch method for every stylesheet in the document.stylesheets collection (instead of overwriting getters/setters for the CSSStyleSheet object) or something like that.
This isn't working, but that doesn't surprise me. Somehow the property/attribute disabled gets changed without notifying the watcher method. I saw that same thing happening when I overwrote the getter and/or setter of the CSSStyleSheet object with disabled. Somehow the stylesheet still gets disabled.
I guess the only way to keep track if the user has chosen a different stylesheet is with setInterval.
So it is not possible to extend an existing function with definegetter/definesetter?