@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 +1 -1
- package/src/browserTab.js +7 -8
package/package.json
CHANGED
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.
|
|
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
|
-
|
|
49
|
-
|
|
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 {
|
|
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?.
|
|
96
|
-
Object.assign(properties, {active: message.
|
|
94
|
+
if (message?.focusNewTab !== undefined) {
|
|
95
|
+
Object.assign(properties, {active: message.focusNewTab});
|
|
97
96
|
}
|
|
98
97
|
|
|
99
98
|
let {tabId} = await tabOpCreateNear(properties);
|