Reputation: 96835
I'm trying to find DOMWindow but it keeps saying it's undefined. How do I get it?
(function() {
alert(this.constructor); // function DOMWindow() { [native code] }
alert(DOMWindow); // DOMWindow is undefiend
})();
What's wrong here??
Upvotes: 1
Views: 126
Reputation: 270677
Perhaps what you want is alert(window)
or alert(window.constructor)
? DOMWindow
is the constructor function which creates window
.
(function() {
alert(this.constructor); // function DOMWindow() { [native code] }
alert(window);
// or...
alert(window.constructor);
})();
// window shows:
// [Object DOMWindow]
// window.constructor shows:
// function DOMWindow() { [native code] }
Upvotes: 2