blob: 97781b1c85feb8b95ceaf73e634cf8874eaf87cc [file] [log] [blame]
<html>
<head>
<script>
function handleStorageEvent(e)
{
parent.log("Subframe received storage event:");
parent.log("Key - " + e.key);
parent.log("New Value - " + e.newValue);
parent.log("Old Value - " + e.oldValue);
parent.log("url - " + parent.normalizeURL(e.url));
parent.log("Storage Area - " + ((e.storageArea == window.sessionStorage) ? "This window's window.sessionStorage" : "Another window's window.sessionStorage"));
parent.log("");
if (e.key != "Subframe") {
parent.log("Subframe about to change sessionStorage...");
sessionStorage.setItem("Subframe", "SET");
}
}
</script>
</head>
<body onload="window.addEventListener('storage', handleStorageEvent, false);">
This is the subframe which exists to make sure that both frames of a same security origin receive the event for that origin's sessionStorage object mutating
</body>
</html>