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)