1
0
Fork 0
firefox/testing/web-platform/tests/cookies/samesite/resources/navigate.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

25 lines
690 B
HTML

<!DOCTYPE html>
<meta charset="utf-8">
<script src="/cookies/resources/cookie-helper.sub.js"></script>
<script>
window.addEventListener('load', function() {
if (window.opener)
window.opener.postMessage({ type: 'READY' }, '*');
if (window.parent !== window)
window.parent.postMessage({ type: 'FRAME_READY' }, '*');
});
window.addEventListener('message', function(e) {
if (e.data.type === "navigate") {
window.location = e.data.url;
}
if (e.data.type === "post-form") {
var f = document.createElement('form');
f.action = e.data.url;
f.method = "POST";
document.body.appendChild(f);
f.submit();
}
});
</script>