For quite a while now, I wanted to add a level of customizability (is that even a word?) to my DHTML widgets other than just look and feel. For instance, say you wanted to have the menus in the
XWeb Menu to be positioned with a certain offset. While this can be done through JavaScript, I want functionality such as this to be accessed and changed through CSS using custom CSS properties and values. That way the user doesn't have to pop the hood, filter through many lines of code, and change it for every redesign.
IE gives me this functionality thanks to the currentStyle and runtimeStyle objects. Say what you will about MSIE, but MS has given the developer quite a few tools over the years to make life a tad easier (although I wish they'd give us a true upgrade to the browser not just a service pack). innerHTML, while scoffed at by purists, is a wonderful tool. Behaviors are another technology that MS came to market with. Granted, the W3C has a recommendation for the little widgets, but MS was the first to put forth a working tech. IE's DOM is flexible and thorough. Sure, it's not 100% standard, but everything (and I mean everything) in the HTML document is loaded into the DOM for me to manipulate through JavaScript.
Mozilla, on the other hand, still wants to keep their DOM and browser pure. The getComputedStyle() method only retrieves valid CSS properties. I can kind of understand their thinking, but they've put themselves into a position where they'll have to work far more when new CSS properties are available. Even the styleSheets object filters out all invalid CSS; so retrieving custom CSS from the styleSheets and cssRules objects is impossible. I want to know why! The browser will ignore it anyway, so why filter it out?
Until the devs at Mozilla decide to give the developer more tools, it looks as though I'm out of luck. I guess I could add in some checks to look for certain tags in the document for the settings of DHTML widgets, but that is an ugly way of doing it. CSS is required for DHTML widgets; it makes sense to put all settings there.
I've made my opinions known in the Mozilla newsgroups. I can only sit and hope they do something about it.