That was it. One simple line of code. I am against copying and pasting code without knowing what the it does, so let’s delve into it to better understand it.
This is the current window object in the DOM. From here you have access to everything you typically have access to, but when it is a tab and opened from another page, you have access to:
which is a property that is a reference to the window that created it. You could feasibly make other changes to the calling tab’s DOM via this.
The other methods are self-explanatory: gets the current location, or URL, and reloads it. reload does the same thing as pressing F5 or selecting the refresh button in your browser.