Bug 20447 - window.toString() gives different output for Safari/FF/IE
Summary: window.toString() gives different output for Safari/FF/IE
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
URL: javascript:alert(window)
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-19 13:26 PDT by Eric Seidel (no email)
Modified: 2022-08-06 05:37 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2008-08-19 13:26:55 PDT
Safari:  "[object DOMWindow]"
FireFox: "[object Window]"
Opera:   "[object Window]"
IE:      "[object]"

I'm not sure which is correct.  But it seems like we might want to match either FF or IE here.  Maybe it doesn't matter.  I don't have a site which is broken due to this only record of a crazy internal page using this as a way to detect browser type!?  :)
Comment 1 Ahmad Saleem 2022-08-06 05:37:51 PDT
From attached test case in URL field, I get [object Window] in all browsers (Chrome Canary 106, Firefox Nightly 105 and Safari 15.6).

JSFiddle from URL field Test case - https://jsfiddle.net/st7L03b8/


JSFiddle for toString test case - https://jsfiddle.net/ygtSk/

In other test case, similarly for all browsers - I get [object String].

Since all browsers are now matching, I am going to mark this as "RESOLVED CONFIGURATION CHANGED". Thanks!