Source code

Revision control

Copy as Markdown

Other Tools

<!DOCTYPE HTML>
<html>
<!--
This page is opened in a new window by test_storage_copied.html.
We need to return the sessionStorage value for the item "test-item",
by way of postMessage to the opener.
-->
<head>
<body>Opened!</body>
<script>
let target = window.opener || window.parent;
target.postMessage(
window.sessionStorage.getItem("test-item"), "*");
</script>
</html>