RESOLVED CONFIGURATION CHANGED Bug 78722
Expose Window constructor
https://bugs.webkit.org/show_bug.cgi?id=78722
Summary Expose Window constructor
Erik Arvidsson
Reported 2012-02-15 10:18:15 PST
We currently do not expose the Window constructor. Other browsers do. assertTrue(window.Window !== undefined) This is related to bug 78721 which is about renaming the constructor.
Attachments
Patch (3.30 KB, patch)
2012-02-15 12:10 PST, Erik Arvidsson
no flags
Ian 'Hixie' Hickson
Comment 1 2012-02-15 11:32:06 PST
Constructor? You mean prototype object, right? Window shouldn't be a constructor.
Erik Arvidsson
Comment 2 2012-02-15 11:49:29 PST
(In reply to comment #1) > Constructor? You mean prototype object, right? Window shouldn't be a constructor. No. I mean constructor. It is not constructable but it is still a constructor. Just like Document and HTMLDocument are exposed. IE and Mozilla pass the following assertTrue(typeof Window !== 'undefined');
Erik Arvidsson
Comment 3 2012-02-15 12:10:19 PST
WebKit Review Bot
Comment 4 2012-02-15 18:47:27 PST
Comment on attachment 127211 [details] Patch Clearing flags on attachment: 127211 Committed r107869: <http://trac.webkit.org/changeset/107869>
WebKit Review Bot
Comment 5 2012-02-15 18:47:32 PST
All reviewed patches have been landed. Closing bug.
Csaba Osztrogonác
Comment 6 2012-02-16 01:39:20 PST
Reopen, because it broke 3 tests on Qt. I assume that on other platforms too, but unfortunately I can't check it, because build.webkit.org is unavailable. - fast/dom/Window/window-properties.html - http://build.webkit.sed.hu/results/x86-64%20Linux%20Qt%20Release/r107900%20%2833816%29/fast/dom/Window/window-properties-pretty-diff.html - fast/dom/Window/window-property-descriptors.html - http://build.webkit.sed.hu/results/x86-64%20Linux%20Qt%20Release/r107900%20(33816)/fast/dom/Window/window-property-descriptors-pretty-diff.html - fast/js/global-constructors.html - http://build.webkit.sed.hu/results/x86-64%20Linux%20Qt%20Release/r107900%20%2833816%29/fast/js/global-constructors-pretty-diff.html I think the first two tests only needs to be rebaselined. But the third one seems an error: +FAIL Window.toString() should be [object WindowConstructor]. Was [object DOMWindowConstructor].
Csaba Osztrogonác
Comment 7 2012-02-16 02:40:09 PST
I updated the 3 tests on Qt - http://trac.webkit.org/changeset/107916 Please check what should we do with the 3rd failing test.
Erik Arvidsson
Comment 8 2012-02-16 08:36:01 PST
Sorry about that. These tests where in the test_expectation.txt for chromium. I should have realized it would change the expectations for JSC based platforms. (In reply to comment #7) > I updated the 3 tests on Qt - http://trac.webkit.org/changeset/107916 > Please check what should we do with the 3rd failing test. The FAIL in global-constructors-expected.txt is bug 78721 The changes to the Skipped file seems unrelated though.
Ahmad Saleem
Comment 9 2022-07-26 09:48:47 PDT
From WPT - Safari passes all "window constructor" events, do we need anything further? https://wpt.fyi/results/dom/events?label=master&label=experimental&aligned&q=constructor Please ignore my comment, if I incorrect or wrong and update latest status accordingly. Thanks!
Ryosuke Niwa
Comment 10 2022-07-26 10:03:51 PDT
We have window.Window now.
Radar WebKit Bug Importer
Comment 11 2022-07-26 10:04:39 PDT
Note You need to log in before you can comment on or make changes to this bug.