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 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:17 GMT