I want to open a tab inside an open window. Something like that
(he should open a new window with "google.co.uk" with a new tab "google.de"
newWindow = window.open('http://www.google.co.uk', '', 'width=10');
newWindowTab = newWindow.open('http://www.google.de', '_blank');
but this opens "newWindowTab" only in the window where this code is.
I also tried this to give the window time to load until it (should) open a new tab:
newWindow = window.open('http://www.google.co.uk', '', 'width=10');
setTimeout(function() {
newWindowTab = newWindow.open('http://www.google.de', '_blank');
}, 500);
But then I get:
Error: permission to access the "open" property
I used firefox. I heard that this is possible in Chrome, but I want to use this script in Firefox.
source
share