In a browser enviroment, the Window is considered the global scope.
The window object implements the Window interface, which in turn inherits from the AbstractView interface.
Some additional global functions, namespaces objects, interfaces, and constructors, not typically associated with the window, but available on it, are listed in the JavaScript Reference and DOM Reference.
The window object represents the window itself.
The document property of a window points to the DOM document loaded in that window.
A window for a given document can be obtained using the document.defaultView property.
In a tabbed browser, such as Firefox, each tab contains its own window object (and if you're writing an extension, the browser window itself is a separate window too.
That is, the window object is not shared between tabs in the same window. Some methods, namely window.resizeTo and window.resizeBy apply to the whole window and not to the specific tab the window object belongs to. Generally, anything that can't reasonably pertain to a tab pertains to the window instead.
window
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With