Skip to content
On this page

window.opener

Title
window.opener
Category
Web API
Tags
Aliases
window.opener
Related
Created
last year
Updated
last year
  • window A 가 window B를 열면 B.openerA 이다.
js
// in https://facebook.com
const google = window.open('https://google.com/');

console.log(google.opener.location.href);
// https://facebook.com
// in https://facebook.com
const google = window.open('https://google.com/');

console.log(google.opener.location.href);
// https://facebook.com

References

Released under the MIT License.