Should IE drop currentStyle/ runtimeStyle?

We (the IE team) are _considering_ dropping support for currentStyle and runtimeStyle in our next most "standards compliant" mode. However, because there is interest in this space (via the CSSOM spec [1], we wanted to get a feel for whether other browsers are considering implementing these APIs or not. (We see that Opera has an implementation.)



I see some benefits to keeping them and a few drawbacks:



Benefits to keeping currentStyle/ runtimeStyle

* easy to use API (style object directly available via an element)

* [currentstyle] provides a view of the CSS cascaded values that has been identified to be useful (in addition to computed values)

* [runtimestyle] provides an equivalent to getOverrideStyle (not widely implemented)



Drawbacks to keeping currentStyle/ runtimeStyle

* it's an unwanted code branch detection point used to identify IE (and Opera too)

* [currentstyle] is not the same as getComputedStyle values, and translations between the two are hard

* currentStyle/ runtimeStyle cannot handle psuedo-elements (the existing ones and any possible new ones)



_IF_ we are to drop support for these, we'd want to provide a more "standards compliant" replacement, for which:

runtimeStyle -> getOverrideStyle

currentStyle -> ??



Given existing API design precedent, it seems logical to create a "getCascadedStyle" API that would replace "currentStyle" in the future--it can handle pseudo-elements and would be similar to related style APIs of which web developers are already familiar.



Any strong opinions on this matter?



-Travis



[1] http://dev.w3.org/csswg/cssom/ (is there a later version of this editor's draft?)

Received on Tuesday, 22 September 2009 14:08:25 UTC