- const execution = await internals.getRoot().tabs.executeScript(activeTabs[0].id, {
- file: '/content_script.js'
- });
-
- if (!execution || !execution[0]) {
- internals.onDisconnect();
- }
- }
- ,
-
+ internals.currentUrl = activeTabs[0].url;
+ const execution = await internals.getRoot().tabs.executeScript(
+ activeTabs[0].id,
+ {
+ file: "/build/content_script.js",
+ },
+ () => {
+ if (internals.getRoot().runtime.lastError) {
+ internals.onDisconnect();
+ }
+ },
+ );
+
+ if (execution && !execution[0]) {
+ internals.onDisconnect();
+ }
+ },