W3C home > Mailing lists > Public > www-svg@w3.org > May 2000

Re: The getStyle() method

From: Jon Ferraiolo <jferraio@Adobe.COM>
Date: Fri, 26 May 2000 14:02:00 -0700
Message-Id: <200005262059.NAA06745@mail-345.corp.Adobe.COM>
To: "Kenneth Wallis" <kennethw@corel.com>
Cc: www-svg@w3.org
Kenneth,
I have more information about getStyle().

The Netscape level 4 browsers do not allow attribute-based DOM access to
browser plugins. The significance of this is that it is impossible for a
browser plugin to get a CSSStyleDeclaration object by saying: "foo =
text_element.style". Because of this limitation with Netscape level 4, the
Adobe plugin has added a getStyle() method call so that folks working with
today's browsers can get to a CSSStyleDeclaration object. But people should
be aware that getStyle() is not part of any W3C standard and thus is likely
to work only with the Adobe plugin.

If you want cross-browser scripting that conforms to the SVG spec, then
stick with getAttribute and setAttribute to access/modify the 'style'
attribute using strings.

Because getStyle() is not part of the SVG spec, it is clear that the
example in 19.3 should not use this method.

Jon Ferraiolo
SVG Editor
Adobe Systems Incorporated


At 12:04 PM 5/26/00 -0400, Kenneth Wallis wrote:
>In the svg spec, section 19.3, there is an example of animation using
>the SVG DOM.  In this example, there is the following line:
>
>text_element.getStyle().setProperty("opacity", "opacity:" +
>opacityfactor, "")
>
>I was wondering where the getStyle() method is defined?  I have looked
>and can't find this method anywhere.
>
>Thanks
>Kenneth Wallis
>Software Developer
>Corel Corporation
>
>--
>Take your office suite performance to an exciting new level. Check it
>out at http://www.corel.com/featuresinaction
>
>
> 
Received on Friday, 26 May 2000 16:59:54 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 5 November 2012 23:52:47 GMT