mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
41 lines
627 B
HTML
41 lines
627 B
HTML
|
<html>
|
||
|
<head>
|
||
|
<script>
|
||
|
|
||
|
window.addEventListener("message", onMessageReceived, false);
|
||
|
|
||
|
function postMsg(msg)
|
||
|
{
|
||
|
parent.postMessage(msg, "http://localhost:8888");
|
||
|
}
|
||
|
|
||
|
function onMessageReceived(event)
|
||
|
{
|
||
|
if (event.data == "check") {
|
||
|
postMsg(sessionStorage.getItem("foo"));
|
||
|
|
||
|
var gotValue = "threw";
|
||
|
try {
|
||
|
gotValue = sessionStorage.getItem("foo-https");
|
||
|
} catch (e) {
|
||
|
}
|
||
|
|
||
|
postMsg(gotValue);
|
||
|
|
||
|
postMsg("the end");
|
||
|
}
|
||
|
}
|
||
|
|
||
|
function start()
|
||
|
{
|
||
|
sessionStorage.setItem("foo", "insecure");
|
||
|
postMsg(sessionStorage.getItem("foo"));
|
||
|
}
|
||
|
|
||
|
</script>
|
||
|
</head>
|
||
|
<body onload="start();">
|
||
|
insecure
|
||
|
</body>
|
||
|
</html>
|