https://developer.mozilla.org/en-US/docs/Web/API/Window.self
Do you mean this?