Bug 33106
| Summary: | 'load' events fire with event.eventPhase set to '0' instead of '2' AT_TARGET | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Diego Perini <diego.perini> |
| Component: | Page Loading | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED WORKSFORME | ||
| Severity: | Normal | CC: | ap |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | PC | ||
| OS: | OS X 10.5 | ||
Diego Perini
I tested this both on Safari Version 4.0.4 (6531.21.10) and Version 3.1.2 (5525.20.1)
I noticed that the 'load' event will fire with event.eventPhase set to '0' instead of '2' AT_TARGET.
This happens in Safari both using DOM2 or DOM0 registration. Doesn't happen in any other tested browser.
Simple test I used:
DOM2
window.addEventListener('load', function(e) { alert("event.eventPhase: " + e.eventPhase + "\nphase should be: 2"); }, false);
DOM0
window.onload = function(e) { alert("event.eventPhase: " + e.eventPhase + "\nphase should be: 2"); };
from what I understand the possible values are 1, 2 and 3 ... If I recall 0 was for custom events.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Alexey Proskuryakov
I can reproduce with shipping Safari/WebKit, but not with a ToT WebKit build - possibly fixed in <http://trac.webkit.org/changeset/48701>. Please test with a nightly build from <http://nightly.webkit.org>.
Diego Perini
Alexey, that was fast ;-)
Solves for me, when the 'load' event fires on window object, 'eventPhase' property is now correctly AT_TARGET (2).
Tested with nightly build (r52686).
Thank you for your precious help.