We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
window.onload
1 parent c587e38 commit 1d50e09Copy full SHA for 1d50e09
src/tests/window/window.html
@@ -104,3 +104,16 @@
104
});
105
testing.eventually(() => testing.expectEqual(true, dcl));
106
</script>
107
+
108
+<script id=window.onload>
109
+ let isWindowTarget = false;
110
111
+ const callback = (e) => isWindowTarget = e.target === window;
112
+ // Callback is not set yet.
113
+ testing.expectEqual(null, window.onload);
114
+ // Callback is set.
115
+ window.onload = callback;
116
+ testing.expectEqual(callback, window.onload);
117
118
+ testing.eventually(() => testing.expectEqual(true, isWindowTarget));
119
+</script>
0 commit comments