W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2000

Re: image onload?

From: <keshlam@us.ibm.com>
Date: Fri, 7 Jul 2000 11:11:15 -0400
To: www-dom@w3.org
Message-ID: <85256915.00536DDD.00@D51MTA03.pok.ibm.com>
>You can preload images via JavaScript.

That's out-of-scope for the DOM, of course. We just provide hooks;
implementing <script/> and so on is left to higher-level code.

I believe the reason we mention Load events only in conjuction with
specific nodes is to avoid breaking existing scripts. HTML says explicitly
which nodes will receive this event; if others start getting it, page
behavior might change. (Folks mayt not be checking the target node, so a
new Load might cause a listener to fire at the wrong time.)

Note that if the higher-level code fires any event event against a node,
the DOM doesn't care which node it was -- it just propigates the event
through its normal capture-and-bubble sequence. So if your code sent a Load
event to an <img/>, the right thing would happen. But it seems that the
HTML 4.01 spec says that won't happen automatically in a normal HTML DOM.

It sounds like what you really want is an HTML extension, not just a a DOM

Joe Kesselman  / IBM Research
Received on Friday, 7 July 2000 11:11:44 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:07 UTC