W3C home > Mailing lists > Public > www-style@w3.org > February 2002

pseudoElt argument to getComputedStyle()

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 25 Feb 2002 21:05:40 -0500
Message-Id: <200202260205.VAA26387@pedagogue.mit.edu>
To: www-dom@w3.org, www-style@w3.org
Cc: caillon@returnzero.com
The second argument to getComputedStyle() is defined as:

pseudoElt of type DOMString 
   The pseudo-element or null if none.

This seems to me to be very much under-specified.

For example, is "first-letter" an acceptable value of "pseudoElt"?  What
about ":first-letter"?  What about "::first-letter"?

Presumably ":selection" would be invalid, but what about "selection" or
"::selection"?

It seems to me that in this context the string is unambiguously a
pseudo-element, so "first-letter", ":first-letter", "::first-letter",
"selection", "::selection" should all be allowed and do the right thing,
while ":selection" should not have any effect (be treated as "" or null).

Comments?

Boris
-----------------
617-864-9910
-----------------
We are all agreed that your theory is crazy.  The
question which divides us is whether it is crazy enough
to have a chance of being correct.  My own feeling is
that it is not crazy enough.
                                     -- Niels Bohr
Received on Monday, 25 February 2002 21:05:55 GMT

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