LibWeb: Expose window.self and window.frames

"self" is a way to refer to the global object that will work in both
a window context and a web worker context.

"frames" apparently used to return a list of frame objects according
to MDN, but it now just returns the window object.
This commit is contained in:
Luke 2020-08-31 14:08:10 +01:00 committed by Andreas Kling
commit 8aabec1c94
Notes: sideshowbarker 2024-07-19 02:57:38 +09:00
2 changed files with 10 additions and 0 deletions

View file

@ -0,0 +1,8 @@
loadPage("file:///res/html/misc/blank.html");
afterInitialPageLoad(() => {
test("window.{window,frames,self} all return the Window object", () => {
expect(window.window).toBe(window.frames);
expect(window.window).toBe(window.self);
});
});