W3C home > Mailing lists > Public > public-webapi@w3.org > January 2007

Re: capturing load events

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Wed, 03 Jan 2007 13:01:15 +0100
To: "Hallvord R. M. Steen" <hallvord@opera.com>
Cc: public-webapi@w3.org
Message-ID: <l36np2lpf1b6uuimn3qkm2mg2aq7m3ttct@hive.bjoern.hoehrmann.de>

* Hallvord R. M. Steen wrote:
>Opera actually fires a "load" event on BODY for compatibility with typical  
>DOM0 <BODY onload="..."> code. This extra compatibility effort doesn't  
>seem to be necessary since both IE6 and Firefox say "true" for the document

If there is ever going to be a specification for this, it would probably
say that the event handler attributes on the body element register event
listeners on the `window` object in some way. Try for example:

  <body onload='0xdeadbeef'>

In Internet Explorer window.onload and document.body.onload would also
be the exact same function, Firefox does not set document.body.onload
in this case. Note specifically that onerror='...' is very different
from the 'error' event.
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Wednesday, 3 January 2007 12:01:24 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:22 UTC