gecko-dev/dom/indexedDB/test/third_party_window.html
2019-03-08 09:03:15 +00:00

34 lines
667 B
HTML

<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<html>
<head>
<title>Indexed Database Test</title>
<script type="text/javascript">
let init = false;
onmessage = evt => {
if (!init) {
init = true;
let iframe = document.getElementById("iframe1");
iframe.src = evt.data.iframeUrl;
iframe.addEventListener("load", e => {
iframe.contentWindow.postMessage(evt.data.toSource(), "*");
});
return;
}
opener.postMessage(evt.data, "*");
};
</script>
</head>
<body>
<iframe id="iframe1"></iframe>
</body>
</html>