document.onload = init("document.onload") means "Run the function 'init' right now, passing it the argument 'document.onload'. The return value will be a function which should be installed as the onload handler on the document". So the behavior on your testcase is in fact correct. What you want to do is: document.onload = init; (note that 'init' is _not_ called in this case; it is merely assigned to the onload handler. It will be called with a single argument which is the onload event when the load actually completes).
Status: UNCONFIRMED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → INVALID
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.