Window.Opener | Not Working in Chrome

window.opener | not working in chrome

the parent window can only be accessed using the parent variable.
The following modification to opener1 function should make this possible

function opener1(){
try{
if(parent.window.opener != null && !parent.window.opener.closed)
{
parent.window.opener.test1();
}

}catch(e){ alert(e.description);}
}

Window.open() not working on google chrome

Per https://developer.mozilla.org/en-US/docs/Web/API/Window/open

It appears you need the second param.

window.open(url, windowName, [windowFeatures]);

openWindow(info) {
window.open('http://10.100.100.100:9999/window?someInfo=' + info, '_blank');
},

javascript window.open will not work on Chrome console?

This is likely a result of security measures taking over to protect the browser. Generally the window.open() function requires some type of user interaction in order to be opened programatically (i.e. a button being clicked, etc.).

If no behavior like this occurs and the browser receives a window.open() request, the built-in pop-up blocker will likely handle it as it will assume something nefarious is afoot.

window.open not working in chrome extension popup

Chrome extensions cannot use inline code. Instead, get the element in Javascript. See https://developer.chrome.com/extensions/contentSecurityPolicy



Related Topics



Leave a reply



Submit