mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 07:03:29 +00:00
don't allow object to be set on window.onload
This commit is contained in:
@@ -111,6 +111,9 @@
|
||||
const callback = (e) => isWindowTarget = e.target === window;
|
||||
// Callback is not set yet.
|
||||
testing.expectEqual(null, window.onload);
|
||||
// Setting an object.
|
||||
window.onload = {};
|
||||
testing.expectEqual(null, window.onload);
|
||||
// Callback is set.
|
||||
window.onload = callback;
|
||||
testing.expectEqual(callback, window.onload);
|
||||
|
||||
Reference in New Issue
Block a user