About 402,000 results
Open links in new tab
  1. javascript - What is the difference between window, screen, and ...

    Mar 27, 2012 · 417 window is the main JavaScript object root, aka the global object in a browser, and it can also be treated as the root of the document object model. You can access it as window. …

  2. What is a 'window' object in JavaScript? And what are its properties ...

    Jul 21, 2017 · The JavaScript variable window is an object, representing a window containing a DOM document; the document property points to the DOM document loaded in that window.

  3. html - JavaScript window object - Stack Overflow

    Jul 13, 2011 · @hmthr: in JavaScript on browsers, The window object is the container of all global variables. In fact, the window symbol is, itself, a property of the window object (referring back to the …

  4. javascript - window.variableName - Stack Overflow

    Jun 22, 2012 · 29 Global variables in JavaScript are attached to the "global object", which in a browser environment is aliased to window object - this is why you can refer to a global variable either as …

  5. javascript - How do I get the Window object from the Document object ...

    Aug 27, 2009 · I can get window.document but how can I get document.window? I need to know how to do this in all browsers.

  6. How do you explicitly set a new property on `window` in TypeScript?

    Oct 3, 2012 · I setup global namespaces for my objects by explicitly setting a property on window. window.MyNamespace = window.MyNamespace || {}; TypeScript underlines MyNamespace and …

  7. How can I mock the JavaScript 'window' object using Jest?

    openStatementsReport(contactIds) { window.open(`a_url_${contactIds}`); } I would like to mock window 's open function, so I can verify the correct URL is passed in to the open function. Using Jest, I don't …

  8. Can I add attributes to 'window' object in javascript?

    Oct 5, 2012 · Can I add any random attribute to 'window' object in javascript? Some thing like: window.my_own_attr = "my_value" Does it have any side effects with any libraries? And is it cross …

  9. javascript - How do I assign a function to the window object while ...

    Feb 4, 2019 · Learn how to assign a function to the window object while using an ES6 module with this Stack Overflow guide.

  10. javascript - Understanding the 'window' object - Stack Overflow

    Apr 6, 2012 · The window object is effectively two things: The global object for browser-based JavaScript. All of the native objects and methods (Array, String, setTimeout()) and anything you …