W3C home > Mailing lists > Public > www-style@w3.org > September 2009

Should IE drop currentStyle/ runtimeStyle?

From: Travis Leithead <travil@microsoft.com>
Date: Tue, 22 Sep 2009 14:07:30 +0000
To: www-style CSS <www-style@w3.org>
CC: Sylvain Galineau <sylvaing@microsoft.com>, Sharon Cohen <sharco@microsoft.com>
Message-ID: <49142F02149340458FDD20841AD0AD5621D6E016@TK5EX14MBXW653.wingroup.windeploy.ntdev.microsoft.com>
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?


[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

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:13:39 UTC