@vacantthinker/firefox-addon-framework-easy 2026.611.751 → 2026.611.821

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.0611.0751",
3
+ "version": "2026.0611.0821",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "publishConfig": {
package/src/browserTab.js CHANGED
@@ -29,7 +29,7 @@ export function browserTabWaitReloadThenSendMessageToContentJs(message) {
29
29
  * @param message
30
30
  * @param message.tabId{number}
31
31
  * @param message.url{string}
32
- * @param message.options.focusNewTab{boolean}
32
+ * @param message.focusNewTab{boolean}
33
33
  * @returns {Promise<void>}
34
34
  */
35
35
  export async function browserTabCreateToDownload(message) {
@@ -45,9 +45,9 @@ export async function browserTabCreateToDownload(message) {
45
45
  delete message.tabId;
46
46
  }
47
47
  }
48
- if (message.options) {
49
- let focusNewTab = message.options.focusNewTab;
50
- Object.assign(properties, {active: focusNewTab});
48
+
49
+ if (message?.focusNewTab !== undefined) {
50
+ Object.assign(properties, {active: message.focusNewTab});
51
51
  }
52
52
 
53
53
  let {tabId} = await tabOpCreateNear(properties);
@@ -70,8 +70,7 @@ export async function browserTabCreateToDownload(message) {
70
70
  * * @param {Object} message - The message payload.
71
71
  * @param {number} [message.tabId] - Optional Tab ID to attach to.
72
72
  * @param {string} [message.url] - The URL to open.
73
- * @param {Object} [message.options] - Additional options.
74
- * @param {boolean} [message.options.focusNewTab] - Whether the newly created tab should be active.
73
+ * @param {boolean} [message.focusNewTab] - Whether the newly created tab should be active.
75
74
  * @returns {Promise<void>}
76
75
  */
77
76
  export async function browserTabCreateNearSendMessageToContentJs(message = {}) {
@@ -92,8 +91,8 @@ export async function browserTabCreateNearSendMessageToContentJs(message = {}) {
92
91
 
93
92
  // Use optional chaining to safely extract nested properties.
94
93
  // Only assign 'active' if 'focusNewTab' was explicitly provided.
95
- if (message?.options?.focusNewTab !== undefined) {
96
- Object.assign(properties, {active: message.options.focusNewTab});
94
+ if (message?.focusNewTab !== undefined) {
95
+ Object.assign(properties, {active: message.focusNewTab});
97
96
  }
98
97
 
99
98
  let {tabId} = await tabOpCreateNear(properties);