Get HTML of remote page with JS

Not really what I’m looking for. It was fired 5 times (or less and threw Message manager disconnected if tab was closed) but I need fire it only once when page loaded.

You can check what changed, which is in your case the tab status that should change.

1 Like

Oh it even could work before, I just missed that tab info have to be updated with tabs.get(). Timer on 3 seconds was a temp placeholder anyway so thx.

In your code, you are waiting to capture, but you are still printing the old tab object. That is not being updated. Every call to the tabs API gives you a new copy. If you need a fresh one, use tab = await tabs.get(tab.id).