3 ms·
I have some of my interesting debugging stories piled up on my blog drafts. One of them was the issue "script not triggered when opened in a new tab". And indee
by darekkay 6y ago
I have some of my interesting debugging stories piled up on my blog drafts. One of them was the issue "script not triggered when opened in a new tab". And indeed, there was a 3rd party script on our page that was triggered on every page (re)load, but not when opened in a new tab. I was baffled at first, but the reason was rather straightforward: the injected script was using an "if (!document.hidden)" check, which wasn't passing for background tabs.