W3C home > Mailing lists > Public > www-style@w3.org > July 2008

Re: [CSSOM] Can we have a .computedStyle in ElementCSSInlineStyle

From: Garrett Smith <dhtmlkitchen@gmail.com>
Date: Sat, 12 Jul 2008 13:09:04 -0700
Message-ID: <c9e12660807121309t1fa24bbbnc68c2de78dc8c343@mail.gmail.com>
To: "Francois Remy" <fremycompany_pub@yahoo.fr>
Cc: "CSS 3 W3C Group" <www-style@w3.org>

On Sat, Jul 12, 2008 at 6:26 AM, Francois Remy
<fremycompany_pub@yahoo.fr> wrote:
> Here's a proposal for the CSSOM Editor's Draft (Opera)
>   interface ElementCSSInlineStyle {
>     // Return the inline element style
>     readonly attribute CSSStyleDeclaration style;

runtimeStyle has nothing to do with JScript; it's an IE feature.
>     // Return the JScript style (obsolete?)
>     readonly attribute CSSStyleDeclaration runtimeStyle;
>     // Return all rules that are finally applied to the element
>     readonly attribute CSSStyleDeclaration currentStyle;
>     // Return the style that's finally applied on the element
>     readonly attribute CSSStyleDeclaration computedStyle;
>   };
> el.computedStyle must return the same value as
> defaultView.getComutedStyle(el)
> ------------------------------------

Get the properties off the element would be simpler.


var computedTop = el.computedStyle.top;
var currentStyle = el. currentStyle.top;

To avoid compatibility issues for cross browser scripting, it might be
better to call it "cascadedStyle" instead of "currentStyle".

runtimeStyle would returns the overrideStyle.To avoid compatibility
issues, it might be better to call it "overrideStyle". The property
would get or set property values on the highest priority. This would
be the same thing as document.defaultView.getOverrideStyle.

> Regards,
> Fremy
Received on Saturday, 12 July 2008 20:09:41 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:38 UTC