Is it possible to open a new popup tab that would run in a separate thread? To be more specific, if I create a new popup tab and start debugging in that new tab, tab which contains link will also pause javascript until I click resume in a new tab. What I want to achieve is to create a new tab that is separated so I can debug it while parent tab continues running. I have this problem using Chrome browser. Note that this works fine in Firefox (haven't tested in other browsers).
The current version of Chrome does not appear to use a separate thread when using the null opener trick that domagojk referenced. However, if you're in a javascript handler you can still take advantage of the noreferrer link trick he mentions:
var e = document.createElement("a");
e.href="/index.html";
e.target="_blank";
e.rel = "noreferrer";
e.click();
Usually chrome forces new window to run on the same Process ID. But, there are techniques which allows sites to open a new window without forcing it into the same process:
Use a link to a different web site that targets a new window without passing on referrer information.
<a href="http://differentsite.com" target="_blank" rel="noreferrer">Open in new tab and new process</a>
If you want the new tab to open in a new process while still passing on referrer information, you can use the following steps in JavaScript:
For example:
var w = window.open();
w.opener = null;
w.document.location = "http://differentsite.com/index.html";
Technically the original website still has access to the new one through w
, but they treat .opener=null as a clue to neuter the window.
Source: https://bugzilla.mozilla.org/show_bug.cgi?id=666746
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With