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:24:45 -0800
Cc: www-style@w3.org
Message-Id: <D673648F-7719-4FB9-A78F-D0AEE3C9A43F@gmail.com>
To: Boris Zbarsky <bzbarsky@MIT.EDU>

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

> Brad Kemper wrote:
>> Ah yes. And the reason for that convention?
> Predates the existence of a DOM at all.  In particular, the on*  
> method of binding event handlers dates back to at least Netscape 3.   
> At the time there was no real behavior/rendering distinction between  
> the <body>, the <html>, and the window.  This can be seen in terms  
> of areas used for event delivery, sizing of <body>/<html>, treatment  
> of backgrounds, treatment of CSS sizing in some UAs, etc, etc.

Yes, and my point is that, due to these beginnings, it is still common  
to see window-related on* attributes in the BODY tag, and it is not  
unusual for an HTML author to make a less nuanced distinction between  
the BODY and the window object. So, rather than create a new simple  
selector for WINDOW:focus or VIEWPORT:focus or whatever, it would be  
pretty simple, natural, and understandable for authors to use  
BODY:focus as a parallel to the still-in-use onfocus attribute there.  
Especially considering that BODY:focus isn't otherwise useful for  
anything now.
Received on Monday, 17 November 2008 17:25:27 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:41 UTC