Bug 16367 - onload not called on window load
Summary: onload not called on window load
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows Vista
: P2 Normal
Assignee: Nobody
URL: http://crypto.stanford.edu/~abarth/re...
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-09 10:07 PST by Adam Barth
Modified: 2007-12-09 10:07 PST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Barth 2007-12-09 10:07:58 PST
If a page define an onload function:

window.onload = function () {
  alert('onload called');
}

Is onload called when the page loads?

Firefox 2: Yes
Internet Explorer 7: Yes
Opera 9.24: Yes
Safari 3: Yes

If a page defines the same function using a different syntax:

function onload() {
  alert('onload called');
}

Is onload called when the page loads?

Firefox 2: Yes
Internet Explorer 7: No
Opera 9.24: No
Safari 3: No

Seems like onload should be called in both cases.