W3C home > Mailing lists > Public > www-style@w3.org > April 2007

Returning null from ViewCSS.getComputedStyle()

From: Cameron McCormack <cam@mcc.id.au>
Date: Mon, 23 Apr 2007 05:46:23 +0000
To: www-style@w3.org
Message-ID: <20070423054623.GA21523@arc.mcc.id.au>

Hi.

Is it conforming behaviour for a UA to return null from the call to
ViewCSS.getComputedStyle() if the element is not something that renders?
For example:

  <svg xmlns='http://www.w3.org/2000/svg'>
    <abc xmlns='http://example.org/' id='a'/>
    <script>
      a = document.getElementById('a');
      s = document.defaultView.getComputedStyle(a, null);

      // Is s allowed to be null?
    </script>
  </svg>

SVG states that subtrees rooted in elements, such as the ‘abc’ element
above, are never rendered.  Currently, Batik[1] will return null for any
element that does not derive from SVGStylable, but I’m wondering if that
behaviour is correct.

Thanks,

Cameron

[1] http://xmlgraphics.apache.org/batik/

-- 
Cameron McCormack, http://mcc.id.au/
	xmpp:heycam@jabber.org  ▪  ICQ 26955922  ▪  MSN cam@mcc.id.au
Received on Monday, 23 April 2007 05:46:26 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:50 GMT