@vacantthinker/firefox-addon-framework-easy 2026.608.1026 → 2026.608.1034

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vacantthinker/firefox-addon-framework-easy",
3
- "version": "2026.0608.1026",
3
+ "version": "2026.0608.1034",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "publishConfig": {
package/src/browserTab.js CHANGED
@@ -1,7 +1,7 @@
1
1
  // @ts-check
2
2
 
3
3
  import {browserNotificationCreate} from './browserNotification.js';
4
- import {tabOpCreateNear, tabOpRemove} from './opTab.js';
4
+ import {tabOpCreateNear, tabOpGet, tabOpRemove} from './opTab.js';
5
5
 
6
6
  export async function browserTabSendMessage(tabId, message) {
7
7
  await browser.tabs.sendMessage(tabId, message);
@@ -66,10 +66,16 @@ export async function browserTabCreateNearSendMessageToContentJs(message) {
66
66
  url: message.url,
67
67
  };
68
68
  if (message.tabId) {
69
- Object.assign(properties,{tabId:message.tabId})
69
+ let tabId = message.tabId;
70
+ try {
71
+ await tabOpGet(tabId);
72
+ Object.assign(properties, {tabId});
73
+ } catch (e) {
74
+ delete message.tabId;
75
+ }
70
76
  }
71
77
  if (message.focusNewTab) {
72
- Object.assign(properties, {active:message.focusNewTab})
78
+ Object.assign(properties, {active: message.focusNewTab});
73
79
  }
74
80
 
75
81
  let {tabId} = await tabOpCreateNear(properties);