Skip to main content

windowInterface to rep Browser. Global Object to access most global properties & methods

[<span data-tooltip-id="preview__m5YwpkGE9tqGgqQNY">window</span>](window) instance property

[<span data-tooltip-id="preview__m5YwpkGE9tqGgqQNY">window</span>](window) instance method

!gotcha Window is a function whereas (lowercase) window is an object

References

  1. Web APIAPI Collection extends Browser Runtime (via window)

  2. Front-End App (JS)App to Execute in Browser Runtime with access to window (Global Object)

  3. this Function Call ↔ 👉 <undefined\> (in Strict Mode; Sloppy Mode 👉 window)

  4. Viewportvisible portion of Document in window

  5. close() ↔ to close current window

  6. blur() ↔ to remove focus from cur window

  7. stop() ↔ to stop load current window

  8. focus() ↔ to set focus to current window

  9. moveBy() ↔ to move window by amount rel to cur position

  10. moveTo() ↔ to move window to specific position

  11. open() ↔ to open new Browser window

  12. print() ↔ to print contents of current window

  13. resizeBy() ↔ to resize window by (#_pixels)

  14. resizeTo() ↔ to resize window to specific width & height

  15. **Creation Phase**Global EC created with window & this keyword pointing to it

  16. TransientClient State tends to be temporary & lost on window close (excluding Web Storage API)

  17. searchQuery String for current window location

  18. Location ↔ location Global Object for window instance

  19. document ↔ to return Document Object for window

  20. history ↔ to return History Object for window

  21. location ↔ to return Location Object for window

  22. navigator ↔ to return Navigator Object for window

  23. screen ↔ to return Screen for window

  24. localStorageWeb Storage API to persist data in Browser across sessions incl window close