1 <html class=
"reftest-wait">
4 async
function test() {
5 // We need to go through the event loop first, so we're running this from
6 // a timeout set from the load event. If we were adding a load from the load
7 // event directly we'd just replace the iframe's session history entry
8 // instead of cloning it (and replacing its children).
9 let frame
= document
.getElementById("frame");
11 let p
= new Promise((r
) => {
12 frame
.addEventListener("load", r
, { once
: true });
14 frame
.src
= "1681729-inner2.html";
17 p
= new Promise((r
) => {
18 frame
.contentWindow
.addEventListener("pageshow", r
, { once
: true });
23 document
.documentElement
.removeAttribute("class");
27 <body onload=
"setTimeout(test, 0);">
28 <iframe id=
"frame" src=
"1681729-inner1.html"></iframe>