<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>296649</bug_id>
          
          <creation_ts>2025-07-29 13:56:13 -0700</creation_ts>
          <short_desc>Make window load event dispatch asynchronous to improve WPT compatibility.</short_desc>
          <delta_ts>2026-06-13 12:31:57 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>82931</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Basuke Suzuki">basuke</reporter>
          <assigned_to name="Basuke Suzuki">basuke</assigned_to>
          <cc>rbuis</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2133197</commentid>
    <comment_count>0</comment_count>
    <who name="Basuke Suzuki">basuke</who>
    <bug_when>2025-07-29 13:56:13 -0700</bug_when>
    <thetext>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 =&gt; {
  // Wait for after the load event so that the navigation doesn&apos;t get converted
  // into a replace navigation.
  await new Promise(resolve =&gt; window.onload = () =&gt; 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2133198</commentid>
    <comment_count>1</comment_count>
    <who name="Basuke Suzuki">basuke</who>
    <bug_when>2025-07-29 13:58:49 -0700</bug_when>
    <thetext>rdar://157048720</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2133201</commentid>
    <comment_count>2</comment_count>
    <who name="Basuke Suzuki">basuke</who>
    <bug_when>2025-07-29 14:06:17 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/48677</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2134188</commentid>
    <comment_count>3</comment_count>
    <who name="Basuke Suzuki">basuke</who>
    <bug_when>2025-08-04 07:30:04 -0700</bug_when>
    <thetext>*** Bug 277948 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2138058</commentid>
    <comment_count>4</comment_count>
    <who name="Basuke Suzuki">basuke</who>
    <bug_when>2025-08-21 12:23:28 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/49726</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2220636</commentid>
    <comment_count>5</comment_count>
    <who name="Sam Sneddon [:gsnedders]">gsnedders</who>
    <bug_when>2026-06-13 12:31:57 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 82931 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>