Bug 296649
| Summary: | Make window load event dispatch asynchronous to improve WPT compatibility. | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Basuke Suzuki <basuke> |
| Component: | New Bugs | Assignee: | Basuke Suzuki <basuke> |
| Status: | NEW | ||
| Severity: | Normal | CC: | rbuis, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Basuke Suzuki
Currently the event is firing synchronously. This is the reason many wpt tests using promise_test causes TIMEOUT like this code:
```
promise_test(async t => {
// Wait for after the load event so that the navigation doesn't get converted
// into a replace navigation.
await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0));
...
```
When the promise is created, window.onload is already fired and the promise is never resolved and TIMEOUT happens. Most of the tests under `imported/w3c/web-platform-tests/navigation-api/ordering-and-transition/ failed with TIMEOUT because of this.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Basuke Suzuki
rdar://157048720
Basuke Suzuki
Pull request: https://github.com/WebKit/WebKit/pull/48677
Basuke Suzuki
*** Bug 277948 has been marked as a duplicate of this bug. ***
Basuke Suzuki
Pull request: https://github.com/WebKit/WebKit/pull/49726