WINDOW
vs SCREEN vs DOCUMENT
When
JavaScript is executed inside the browser, the window object is the JavaScript
Global object. Screen and document are
property of the window object.
When
an HTML document is loaded into a web
browser, it becomes a document object. It is the root node of the HTML
document. The document actually gets loaded inside the window object and has
properties available to it like title, URL, cookie, etc.
Screen
is a small information object about physical screen dimensions. It can be used to display screen width, height, colour-depth, pixel-depth etc.
Comments
Post a Comment