I have an external program that calls the default browser passing an URL as argument.
This creates a new tab in Chrome but, depending on the URL, it is possible that an existing tab can be reused, so my Chrome Extension v3 parses the URL in the new tab and, if suitable, kills the new tab and makes the existing tab the active one instead, updating it accordingly.
I tried using the tabs.onCreated
listener and argument tab.pendingURL
with the idea of parsing the URL and, if needed, then killing the tab right the instant it is created.
However, with manifest v3, by the time the onCreated
listener is fired, the page has been long been loading (even several seconds), which translates into a terrible user experience, because the new page fully loads, after that the onCreated
event is fired only to be removed after it loads.
I would like to be able to kill the new tab right after it is created but before it even starts contacting the server. Is this possible with manifest v3?
1