mirror of
https://github.com/servo/servo.git
synced 2025-10-16 16:29:18 +01:00
27 lines
692 B
HTML
27 lines
692 B
HTML
<!DOCTYPE html>
|
|
<meta charset="utf-8">
|
|
<script src="/cookies/resources/cookie-helper.sub.js"></script>
|
|
<script>
|
|
window.addEventListener('load', function() {
|
|
window.opener.postMessage({ type: 'READY' }, '*');
|
|
});
|
|
|
|
window.addEventListener('message', function(e) {
|
|
if (SECURE_ORIGIN !== window.location.origin)
|
|
return;
|
|
if (window.location.origin !== e.origin)
|
|
return;
|
|
|
|
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>
|