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

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.

Example:

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.


Garrett
>
> Regards,
> Fremy

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