Re: image onload?

>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
extension.


______________________________________
Joe Kesselman  / IBM Research

Received on Friday, 7 July 2000 11:11:44 UTC