Using addEventListener to call function when document loads

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 UTC