JavaScript Window Properties
You are Here:
JavaScript Window Properties
The following are the list of Window properties available in JavaScript programming.
Functions | Explanation |
---|---|
closed | Indicates whether the referenced window is closed or not. |
document | Returns a reference to the document contained in the window. |
frameElement | Returns the frame (<iframe>, <object>, and <embed>) element in which the current window is inserted. |
fullScreen | Indicates whether the window is displayed in full screen mode or not. |
innerHeight | Returns the height (in pixels) of the browser window viewport including, the horizontal scrollbar, if rendered. |
innerWidth | Returns the width (in pixels) of the browser window viewport including, the vertical scrollbar, if rendered. |
length | eturns the number of frames (<iframe>, <embed>, and <object>) in the window. |
localStorage | Allows you to access and save data (key/value pairs) in a web browser. |
location.href | Returns the whole URL of the current page. |
location.hostname | Returns the domain name of the web host. |
location.pathname | Returns the path of the current page. |
location.protocol | Returns the web protocol used by the current page (http: or https:). |
location.port | Returns a string containing the port number of the current page. |
opener | Returns a reference to the window that opened the window using window.open(). |
outerHeight | Returns the outer height (in pixel) of the browser window, including sidebar, window chrome, and window-resizing borders/handles. |
outerWidth | Returns the outer width (in pixel) of the browser window, including sidebar, window chrome, and window-resizing borders/handles. |
pageXOffset | Returns the number of pixels that the document is currently scrolled horizontally. |
pageYOffset | Returns the number of pixels that the document is currently scrolled vertically. |
parent | Returns a reference to the parent of the current window or subframe. |
screen.width | Returns the width of the screen, in pixels. |
screen.height | Returns the height of the screen, in pixels. |
screen.availWidth | Returns the amount of horizontal space (in pixels) available to the window. |
screen.availHeight | Returns the amount of vertical space (in pixels) available to the window. |
screen.colorDepth | Returns the color depth of the screen. |
screen.pixelDepth | Returns the bit depth of the screen. |
scrollX | Returns the number of pixels that the document is currently scrolled horizontally. |
scrollY | Returns the number of pixels that the document is currently scrolled vertically. |
self | Returns the current window. |
sessionStorage | Allows you to access and save data (key/value pairs) in a web browser. |
top | Returns a reference to the topmost window in the window hierarchy. |
Reminder
Hi Developers, we almost covered 97% of JavaScript Tutorials with examples for quick and easy learning.
We are working to cover every Single Concept in JavaScript.
Please do google search for:
Join Our Channel
Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.
This channel is primarily useful for Full Stack Web Developer.