blob: 339dc9f06eb791ca96abcf15d48ace15a137a01f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
<!doctype html>
<meta charset=utf-8>
<body>
<script>
// Step 5 (html/browsers/windows/post-message/third-party-to-third-party-same-partition.sub.html)
let site2WindowB;
const listener = e => {
if (e.data === "Site 2 Frame B") {
site2WindowB.close();
window.top.postMessage("Site 2 Frame A", "*");
}
};
// Step 2 (html/browsers/windows/post-message/third-party-to-third-party-same-partition.sub.html)
window.addEventListener("message", listener);
site2WindowB = window.open("http://{{host}}:{{ports[http][0]}}/html/browsers/windows/post-message/resources/third-party-to-third-party-same-partition-window.sub.html", "", "noopener=false");
</script>
</body>
|