W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2002

Using addEventListener to call function when document loads

From: Jonathan Watt <0jaw@qlink.queensu.ca>
Date: Tue, 19 Mar 2002 20:44:51 -0500
Message-ID: <3C97E993.6090807@qlink.queensu.ca>
To: www-dom@w3.org
I have asked this question before, but for whatever reason I didn't get 
an answer. I am going to ask it again as I think that it is important. 
Apologies to anyone who doesn't want to be bothered by it.

How can you use addEventListener in a document to call a function when 
the same document loads? If I understand the recommendations correctly 
then adding onload attributes to tags is only still supported for 
backwards compatibility. But I don't see any way of using 
addEventListener to recreate the same action. Is this something that was 
overlooked during the writing of the recommendations? Or am I myself 
overlooking something?

Regards,

Jonathan.
Received on Tuesday, 19 March 2002 20:41:32 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:55 GMT