HTML DOM Window self( ) Property Last Updated : 15 Jun, 2023 Summarize Comments Improve Suggest changes Share Like Article Like Report The Window self() property is used for returning the current window. It is generally used for comparison purposes while using other functions such as top(). It is a read-only property and it returns a reference to the Window object itself.Syntax: window.self Return Value: Return reference of the Window object. Below program illustrates the Window self() property:Using Window self() property for comparison with the window top() property. html <!DOCTYPE> <html> <head> <title> Window self() property in HTML </title> <style> h1 { color: green; } h2 { font-family: Impact; } body { text-align: center; } </style> </head> <body> <h1>GeeksforGeeks</h1> <h2>Window self() Property</h2> <p> For checking whether the window is the topmost window or not, double click the "Check Top Window" button: </p> <button ondblclick="Window()"> Check Top Window </button> <p id="MyWindow"></p> <script> function Window() { if (window.top = window.self) { document.getElementById("MyWindow").innerHTML = "This window is the topmost window."; } else { document.getElementById("demo").innerHTML = "This window is not the topmost window."; } } </script> </body> </html> Output: After clicking the button Supported Browsers: The browser supported by Window self( ) Property are listed below: Google Chrome 1 and aboveEdge 12 and aboveInternet Explorer 4 and aboveFirefox 1 and aboveOpera 12.1 and aboveSafari 3 and above Comment More infoAdvertise with us Next Article HTML DOM Window screenLeft Property S Shubrodeep Banerjee Follow Improve Article Tags : Web Technologies HTML HTML-Property Similar Reads HTML DOM Window screenLeft Property The Window screenLeft property is used for returning the 'x' or horizontal coordinate of a window relative to a screen. It returns a number which represents the horizontal coordinate of a window relative to a screen. Syntax: window.screenLeft Return Values: It returns a Number that represents the ho 1 min read HTML DOM Window screenY Property The Window screenY property is used for returning the 'y' or the vertical coordinates of a window relative to the screen. It returns a number which represents the vertical distance of a window relative to the screen in pixels. Syntax: window.screenY Below program illustrates the window.screenY prope 1 min read HTML DOM Window screenX Property The Window screenX property is used for returning the 'x' or the horizontal coordinates of a window relative to the screen. It returns a number which represents the horizontal distance of a window relative to the screen in pixels. Syntax: window.screenX Return Value: It returns a number that represe 1 min read HTML DOM Window top( ) Property The Window top() property is used to return the topmost browser window of a current window. It is a read-only property and it returns a reference to the topmost window in the window hierarchy.Syntax: window.top Return Value: It returns the reference of the topmost window in the window hierarchy. Bel 2 min read HTML | DOM Window status Property The Window status property in HTML DOM is used to set or return the text in the status bar at the bottom of the browser. Syntax: window.status Note: This property has been DEPRECATED and is no longer recommended. Return Value: It returns a string which represents the text displayed in the status bar 2 min read HTML DOM Window screenTop Property The Window screenTop property is used for returning the 'y' or vertical coordinate of a window relative to a screen. It returns a number which represents the vertical coordinate of a window relative to a screen.Syntax: window.screenTop Return Value: It returns a number that represents the window hor 2 min read Like