DEV Community

Cover image for 🧩 Code Bits => Window and Document
Calvin
Calvin

Posted on

🧩 Code Bits => Window and Document

Window is a global object of JavaScript while document is a property of the window object.

Window includes the following and more:

πŸ”΅ Global functions
πŸ”΅ Location
πŸ”΅ History
πŸ”΅ Web Components
πŸ”΅ setTimeout
πŸ”΅ XML-Http Request
πŸ”΅ Console
πŸ”΅ LocalStorage

Document includes the following:

πŸ”΅ DOM (Document Object Model) of the page
πŸ”΅ Methods that traverse the DOM

Source


Top comments (0)