javascript - Disallow window.opener from child window -


i'm opening popup page code this:

var w = window.open(url, "_self"); w.opener = null; 

or this:

var anchor = document.createelement("a");   anchor.target = "_blank";   anchor.href = url;   var evt = document.createevent("mouseevents");   evt.initmouseevent("click", true, true, window, 0, 0, 0, 0, 0, true, false, false, true, 0, null); anchor.dispatchevent(evt); 

this works fine, problem document loaded in popup window has permission change location of opener window. works when document in popup different domain. has no permission read location allowed change location. don't want that. want popup disconnected main page.

window.opener.parent.location.href="http://example.com"; in child window change parent window url

is there trick can use break connection between opener window , opened window? ideally opened window should not know opened other window @ all.


Comments

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

html - Outlook 2010 Anchor (url/address/link) -

android - How to create dynamically Fragment pager adapter -