-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unclear "iframe load event steps" for initial load of about:blank in an iframe #490
Comments
cc @hsivonen |
I'd be curious to find out what Edge does, if someone has access. |
If there's a URL for this test I can run it in Edge. I don't see one in the OP. |
|
Nice, 50/50 behaviour split between browsers. |
Previous research on about:blank that might be worth re-testing again: |
My take on what I think is worthwhile pursuing hasn't changed since my previous research. I think the following are trouble and should be avoided:
If I had the time, I'd pursue generating the initial I don't know if this is Web-compatible, but it seems like the least horrible synthesis of the good parts of the behaviors out there. |
Servo is intending to implement the "least horrible synthesis" behaviour described by @hsivonen in a basic attempt to determine its compatibility with the web. |
What are all the events that have to fire before |
FYI, this behavior difference between Firefox/Gecko and Safari/Chrome has been causing unrelated Web-Platform-Tests to fail in some browsers in at least 2 instances I investigated (the most recent one being the Beacon tests contributed by Microsoft). The test's utility script was:
In Safari/Chrome, the onload event handler was called synchronously for the about:blank load, causing onload event handler to get called and checks to be done for the "wrong" document. Then the load event handler was called a second time (unexpectedly for the developer of the script) for the actual test load. It'd be really good to align browsers here one way or another. |
AFAIK current browser initial about:blank handling is only compatible for this case:
Declarative iframe that is synchronously mutated. |
Just to add some more confusion, the current wording for "process the iframe attributes" (https://html.spec.whatwg.org/multipage/iframe-embed-object.html#process-the-iframe-attributes) says:
In particular, this logic doesn't apply when
AFAICT this causes the browsing context to traverse to the existing |
One thing that's odd about the current spec is that the semantics for an unset src are different from
|
The handling of iframe load events is finicky as indicated in the open WHATWG issue: whatwg/html#490 This patch switches the wait mechanism to one that is well behaved across browsers. The new process arms the listener before inserting the iframe into the document. Bug: 1059963 Change-Id: I372d4fdae3b270699aedf2c5a4de4429e62f42a5
The handling of iframe load events is finicky as indicated in the open WHATWG issue: whatwg/html#490 This patch switches the wait mechanism to one that is well behaved across browsers. The new process arms the listener before inserting the iframe into the document. Bug: 1059963 Change-Id: I372d4fdae3b270699aedf2c5a4de4429e62f42a5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2096782 Reviewed-by: Yi Gu <[email protected]> Commit-Queue: Kevin Ellis <[email protected]> Cr-Commit-Position: refs/heads/master@{#748853}
The handling of iframe load events is finicky as indicated in the open WHATWG issue: whatwg/html#490 This patch switches the wait mechanism to one that is well behaved across browsers. The new process arms the listener before inserting the iframe into the document. Bug: 1059963 Change-Id: I372d4fdae3b270699aedf2c5a4de4429e62f42a5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2096782 Reviewed-by: Yi Gu <[email protected]> Commit-Queue: Kevin Ellis <[email protected]> Cr-Commit-Position: refs/heads/master@{#748853}
The handling of iframe load events is finicky as indicated in the open WHATWG issue: whatwg/html#490 This patch switches the wait mechanism to one that is well behaved across browsers. The new process arms the listener before inserting the iframe into the document. Bug: 1059963 Change-Id: I372d4fdae3b270699aedf2c5a4de4429e62f42a5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2096782 Reviewed-by: Yi Gu <[email protected]> Commit-Queue: Kevin Ellis <[email protected]> Cr-Commit-Position: refs/heads/master@{#748853}
…placment.html, a=testonly Automatic update from web-platform-tests Fix timeout in update-and-send-events-replacment.html The handling of iframe load events is finicky as indicated in the open WHATWG issue: whatwg/html#490 This patch switches the wait mechanism to one that is well behaved across browsers. The new process arms the listener before inserting the iframe into the document. Bug: 1059963 Change-Id: I372d4fdae3b270699aedf2c5a4de4429e62f42a5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2096782 Reviewed-by: Yi Gu <[email protected]> Commit-Queue: Kevin Ellis <[email protected]> Cr-Commit-Position: refs/heads/master@{#748853} -- wpt-commits: ee5cfa46292bdcdd576e698503f4a4a9ffa977c0 wpt-pr: 22160
…placment.html, a=testonly Automatic update from web-platform-tests Fix timeout in update-and-send-events-replacment.html The handling of iframe load events is finicky as indicated in the open WHATWG issue: whatwg/html#490 This patch switches the wait mechanism to one that is well behaved across browsers. The new process arms the listener before inserting the iframe into the document. Bug: 1059963 Change-Id: I372d4fdae3b270699aedf2c5a4de4429e62f42a5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2096782 Reviewed-by: Yi Gu <[email protected]> Commit-Queue: Kevin Ellis <[email protected]> Cr-Commit-Position: refs/heads/master@{#748853} -- wpt-commits: ee5cfa46292bdcdd576e698503f4a4a9ffa977c0 wpt-pr: 22160
…placment.html, a=testonly Automatic update from web-platform-tests Fix timeout in update-and-send-events-replacment.html The handling of iframe load events is finicky as indicated in the open WHATWG issue: whatwg/html#490 This patch switches the wait mechanism to one that is well behaved across browsers. The new process arms the listener before inserting the iframe into the document. Bug: 1059963 Change-Id: I372d4fdae3b270699aedf2c5a4de4429e62f42a5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2096782 Reviewed-by: Yi Gu <yiguchromium.org> Commit-Queue: Kevin Ellis <keverschromium.org> Cr-Commit-Position: refs/heads/master{#748853} -- wpt-commits: ee5cfa46292bdcdd576e698503f4a4a9ffa977c0 wpt-pr: 22160 UltraBlame original commit: 1f66d281b8ce3b572f364f86102f3c132ec64c8d
…placment.html, a=testonly Automatic update from web-platform-tests Fix timeout in update-and-send-events-replacment.html The handling of iframe load events is finicky as indicated in the open WHATWG issue: whatwg/html#490 This patch switches the wait mechanism to one that is well behaved across browsers. The new process arms the listener before inserting the iframe into the document. Bug: 1059963 Change-Id: I372d4fdae3b270699aedf2c5a4de4429e62f42a5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2096782 Reviewed-by: Yi Gu <yiguchromium.org> Commit-Queue: Kevin Ellis <keverschromium.org> Cr-Commit-Position: refs/heads/master{#748853} -- wpt-commits: ee5cfa46292bdcdd576e698503f4a4a9ffa977c0 wpt-pr: 22160 UltraBlame original commit: 1f66d281b8ce3b572f364f86102f3c132ec64c8d
…placment.html, a=testonly Automatic update from web-platform-tests Fix timeout in update-and-send-events-replacment.html The handling of iframe load events is finicky as indicated in the open WHATWG issue: whatwg/html#490 This patch switches the wait mechanism to one that is well behaved across browsers. The new process arms the listener before inserting the iframe into the document. Bug: 1059963 Change-Id: I372d4fdae3b270699aedf2c5a4de4429e62f42a5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2096782 Reviewed-by: Yi Gu <yiguchromium.org> Commit-Queue: Kevin Ellis <keverschromium.org> Cr-Commit-Position: refs/heads/master{#748853} -- wpt-commits: ee5cfa46292bdcdd576e698503f4a4a9ffa977c0 wpt-pr: 22160 UltraBlame original commit: 1f66d281b8ce3b572f364f86102f3c132ec64c8d
I believe we fixed this in #6869. |
The spec says that an iframe with no src attribute on first time through
process the iframe attributes
will queue a task to runiframe load event steps
, which dispatches the load event at the iframe element.For the following test hosted on joshmatthews.net:
I get this output from browsers -
Firefox, Edge:
Chrome, Safari:
Specifically, Firefox appears to skip the initial load event for about:blank if the iframe's src is changed before the queued task executes, while Chrome's load event for the initial about:blank load is dispatched synchronously.
What is the intended behaviour here?
The text was updated successfully, but these errors were encountered: