0

I'm having trouble tracking this down for somewhat obvious reasons. What is the Window object in javascript? Not the window object..

Using console.dir(Window) in Chrome shows it has the properties PERSISTANT, TEMPORARY and a length.

Bert
  • 80,741
  • 17
  • 199
  • 164
  • 2
    [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) vs [`Window`](https://developer.mozilla.org/en-US/docs/Web/API/Window). It's the same as [the difference between Document and document in JavaScript](http://stackoverflow.com/q/16790174/1048572) – Bergi Apr 02 '17 at 18:49
  • `Window == window.constructor` – Siguza Apr 02 '17 at 18:51
  • Thanks guys, that's what I was looking for. – Bert Apr 02 '17 at 18:52
  • @Bergi Mind adding http://stackoverflow.com/questions/24008630/what-is-the-difference-between-window-and-window as one of the dupes? Thanks – Andrew Li Apr 02 '17 at 19:01
  • 1
    @AndrewLi Thanks, that's a much better duplicate – Bergi Apr 02 '17 at 19:03

2 Answers2

3

It's the interface that the global window object is an instance of. MDN says:

The window object implements the Window interface, which in turn inherits from the AbstractView interface.

A W3C spec defines the interface here: https://www.w3.org/TR/html5/browsers.html#window

tobek
  • 4,349
  • 3
  • 32
  • 41
1

Window is the constructor function that is used to create window.
Try alert(window.constructor);

Konstantinos
  • 943
  • 1
  • 9
  • 20