HTML | DOM Window opener Properties Last Updated : 10 Sep, 2024 Summarize Comments Improve Suggest changes Share Like Article Like Report The Window opener property in HTML DOM is used to return the reference of newly created windows. This property is used to return the details of the source (parent) window. A window is opened using the window.open() method and closed using the window.opener.close() method. Syntax:window.openerReturn Value: It returns the reference of the created window. Example 1: This example shows the single window opening on clicking the button. HTML <!DOCTYPE html> <html> <head> <title> HTML DOM Window opener Property </title> </head> <body> <h2> HTML DOM Window opener Property </h2> <button onclick="myGeeks()"> Click Here! </button> <!-- script to open new windows --> <script> function myGeeks() { let win = window.open("", "win", "width = 500, height = 300"); win.document.write("<p>New Window</p>"); win.opener.document.write("<p>Parent Window</p>"); } </script> </body> </html> Output: Example 2: This Example shows the double window creation on clicking the single button. HTML <!DOCTYPE html> <html> <head> <title> HTML DOM Window opener Property </title> </head> <body> <h2> HTML DOM Window opener Property </h2> <button onclick="myGeeks()"> Click Here! </button> <!-- script to create two window --> <script> function myGeeks() { let win1 = window.open("", "win1", "width = 500, height = 300"); let win2 = window.open("", "win2", "width = 400, height = 250"); win1.document.write("<p>New Window 1</p>"); win2.document.write("<p>New Window 2</p>"); win1.opener.document.write("<p>Parent Window</p>"); win2.opener.document.write("<p>Parent Window</p>"); } </script> </body> </html> Output: Supported BrowsersGoogle Chrome 1 and aboveEdge 12 and aboveInternet Explorer 9 and aboveFirefox 1 and aboveOpera 3 and aboveSafari 1 and above Comment More infoAdvertise with us Next Article HTML | DOM Input Range Object R riarawal99 Follow Improve Article Tags : Web Technologies HTML HTML-DOM Similar Reads HTML | DOM Progress max Property The DOM Progress max Property is used to set or return the value of the max attribute of an <progress> element. The max attribute represents the total work is to be done for completing a task. Syntax: It is used to return the progress max property. progressObject.maxIt is used to set the progr 2 min read HTML | DOM Textarea autofocus Property The DOM Textarea autofocus Property is used to set or return whether the element should get focus when the page loads. This property is used to reflect the HTML autofocus attribute. Syntax: It is used to Return the autofocus property. textareaObject.autofocusIt is used to Set the autofocus property. 2 min read HTML | DOM ClipboardEvent The ClipboardEvent refers to all the events which occur when the clipboard is modified. All the properties and methods are inherited from the âEvent Objectâ. There are 3 main ClipboardEvents:oncopyoncutonpasteReturn Value: It returns an object containing the data affected by the clipboard operation. 1 min read HTML | DOM Input Range Object The Input Range Object in HTML DOM is used to represent the HTML < input > element with type="range". This object is used to access or create the <input> element. This element can be accessed by using getElementById() method. Syntax: document.getElementById("Input_ID"); This Input_ID is 2 min read HTML | DOM Window closed Property The Window closed property in HTML DOM is used to return a value that indicates whether the referred window is closed or not. Syntax: window.close() Return Value: A Boolean value, true if window is closed otherwise false. Example: HTML <!DOCTYPE html> <html> <head> <title> HT 1 min read HTML | DOM Style textAlignLast Property The Style textAlignLast property in HTML DOM is used to set the alignment of the last line of the text. Syntax: Return the textAlignLast property: object.style.textAlignLast Set the textAlignLast property: object.style.textAlignLast = "auto | left | right | center | justify | start | end | initial | 2 min read HTML | DOM TouchEvent When a user touches a touch-based device the resulted events are handled by TouchEvent Object. The touch events consist of three types of interfaces i.e. Touch, TouchEvent and TouchList. The single contact point events on a touch-sensitive device are handled by the Touch interface. The events which 2 min read HTML | DOM Storage Event The Storage Event in HTML DOM is used to make change in the storage area in the context of another document. When there is modification in the storage area of the window, a storage event is sent to that window. Syntax: window.addEventListener("storage", script) Example: html <!DOCTYPE html> 1 min read HTML | DOM PageTransitionEvent The PageTrasitionEvent occurs during the time a document is being loaded or unloaded. Syntax: PageTransitionEvent.persisted Property Values: persisted: Returns boolean value whether the webpage was cached or not. Return Value: This property returns True if the document is loaded from a cache or not 1 min read HTML DOM Style display Property The HTML DOM Style display property is used to set or return the display type of an element. It is similar to the visibility property, which displays or hides the element. With a slight difference in display: none, hiding the entire element, while visibility: hidden meaning only the contents of the 3 min read Like