window.opener - ythy/blog GitHub Wiki
-
window.openerrefers to the window that calledwindow.open( ... )to open the window from which it's called -
window.parentrefers to the parent of a window in a<frame>or<iframe> -
window.toprefers to the top-most window from a window nested in one or more layers of<iframe>sub-windows
Those will be null (or maybe undefined) when they're not relevant to the referring window's situation. ("Referring window" means the window in whose context the JavaScript code is run.)
- 定义事件名称
POPEvent - 主页面监听事件
$(document).on('POPEvent', this.onOpenerBack, null); - pop派发事件
window.opener.$('body').trigger( 'POPEvent', ['data'] );