Source code

Revision control

Copy as Markdown

Other Tools

<!--
Any copyright is dedicated to the Public Domain.
-->
<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", () => {
iframe.contentWindow.postMessage(JSON.stringify(evt.data), "*");
});
return;
}
opener.postMessage(evt.data, "*");
};
</script>
</head>
<body>
<iframe id="iframe1"></iframe>
</body>
</html>