-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstep-14-sessionstorage.html
63 lines (46 loc) · 1.33 KB
/
step-14-sessionstorage.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<!--
Chrome 69.0.3488.0 (Official Build) canary (64-bit)
Going to call document.open()
document.open() is called
sessionStorage storage area changed to 2
sessionStorage storage area changed to 3
----
Safari Tech Preview Release 60 (Safari 12.0, WebKit 13606.1.23.1)
Going to call document.open()
document.open() is called
sessionStorage storage area changed to 1
sessionStorage storage area changed to 2
sessionStorage storage area changed to 3
----
Firefox Nightly 63.0a1 (2018-07-11) (64-bit)
Going to call document.open()
document.open() is called
sessionStorage storage area changed to 1
sessionStorage storage area changed to 2
sessionStorage storage area changed to 3
----
Microsoft Edge 42.17134.1.0
Microsoft EdgeHTML 17.17134
Going to call document.open()
document.open() is called
sessionStorage storage area changed to 3
-->
<!doctype html>
<meta charset="utf-8">
<pre id=output></pre>
<iframe src="step-14-sessionstorage.frame.html"></iframe>
<script>
function log(thing) {
const output = document.getElementById("output");
output.appendChild(document.createTextNode(`${thing}\n`));
}
function onBeforeDocumentOpen() {
log("Going to call document.open()");
}
function onAfterDocumentOpen() {
log("document.open() is called");
}
function onStorage(ev) {
log(`sessionStorage storage area changed to ${ev.newValue}`);
}
</script>