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

Re: [css3-selectors] Elements that can have :focus pseudo-class

From: Brad Kemper <brkemper.comcast@gmail.com>
Date: Mon, 17 Nov 2008 09:55:26 -0800
Cc: "www-style@w3.org List" <www-style@w3.org>
Message-Id: <BF06ED43-208D-41E4-A263-2A6FF4E8F049@gmail.com>
To: Boris Zbarsky <bzbarsky@MIT.EDU>


On Nov 16, 2008, at 12:34 PM, Boris Zbarsky wrote:

>> It is useful in JavaScript to have the event listening attributes  
>> on the BODY tag
>
> It's "useful" in the sense that it predates the existence of  
> addEventListener.

It is useful in the sense that in the absence of addEventListener, it  
was a reasonable way at the time of abstracting where in the HTML the  
focus would be handled. And since pseudo-classes also do not involve  
addEventListener (or require scripting), and since there is no  
selector for selecting the window, it (the BODY element) would also be  
a reasonable (and familiar) place to us to use a focus pseudo-class.

>> since there is no WINDOW element to use with selectors.
>
> I don't see what this has to do with JavaScript.

Well, it has nothing to do with "addEventListener", which is a bit of  
JavaScript you brought up. It has to do with not re-inventing the  
wheel, and using an abstraction that is already familiar, due to the  
old way of attaching events to the BODY.
Received on Monday, 17 November 2008 17:56:09 GMT

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