webext-schema 5.6.0 → 6.0.0
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/modules/browser.js +5 -5
- package/modules/common.js +7 -7
- package/modules/schema.js +5 -5
- package/modules/update.js +0 -4
- package/package.json +16 -17
- package/schemas/beta/webext.json +103 -167
- package/schemas/central/webext.json +91 -165
- package/schemas/mail/mailext.json +246 -169
- package/types/modules/browser.d.ts +5 -5
- package/types/modules/common.d.ts +5 -5
- package/schemas/release/webext.json +0 -22069
package/modules/browser.js
CHANGED
|
@@ -428,7 +428,7 @@ export const makeConnection = async (id, info) => {
|
|
|
428
428
|
/**
|
|
429
429
|
* send message
|
|
430
430
|
* @param {number|string} id - tab ID / extension ID
|
|
431
|
-
* @param {
|
|
431
|
+
* @param {string|Array|object} msg - message
|
|
432
432
|
* @param {object} opt - options
|
|
433
433
|
* @returns {Promise.<object>} - tabs.sendMessage() | runtime.sendMessage()
|
|
434
434
|
*/
|
|
@@ -679,7 +679,7 @@ export const getAllStorage = async (area = 'local') => {
|
|
|
679
679
|
|
|
680
680
|
/**
|
|
681
681
|
* get storage
|
|
682
|
-
* @param {
|
|
682
|
+
* @param {string|Array|object} key - key
|
|
683
683
|
* @param {string} area - storage area
|
|
684
684
|
* @returns {Promise.<object>} - stored data
|
|
685
685
|
*/
|
|
@@ -698,7 +698,7 @@ export const getStorage = async (key, area = 'local') => {
|
|
|
698
698
|
|
|
699
699
|
/**
|
|
700
700
|
* remove storage
|
|
701
|
-
* @param {
|
|
701
|
+
* @param {string|Array|object} key - key
|
|
702
702
|
* @param {string} area - storage area
|
|
703
703
|
* @returns {Promise.<void>} - void
|
|
704
704
|
*/
|
|
@@ -814,7 +814,7 @@ export const execScriptToTabs = async (opt = {}) => {
|
|
|
814
814
|
* execute scripts to tab in order
|
|
815
815
|
* @param {number|Array} tabId - tabId or array of options
|
|
816
816
|
* @param {Array} opts - array of options
|
|
817
|
-
* @returns {Promise
|
|
817
|
+
* @returns {Promise.<?Array|boolean>} - result of the last executed script
|
|
818
818
|
*/
|
|
819
819
|
export const execScriptsToTabInOrder = async (tabId, opts = []) => {
|
|
820
820
|
const func = [];
|
|
@@ -1058,7 +1058,7 @@ export const captureVisibleTab = async (windowId, opt) => {
|
|
|
1058
1058
|
|
|
1059
1059
|
/**
|
|
1060
1060
|
* is tab
|
|
1061
|
-
* @param {
|
|
1061
|
+
* @param {number} tabId - tab ID
|
|
1062
1062
|
* @returns {Promise.<boolean>} - result
|
|
1063
1063
|
*/
|
|
1064
1064
|
export const isTab = async tabId => {
|
package/modules/common.js
CHANGED
|
@@ -9,7 +9,7 @@ const TYPE_TO = -1;
|
|
|
9
9
|
/**
|
|
10
10
|
* throw error
|
|
11
11
|
* @param {!object} e - Error
|
|
12
|
-
* @throws - Error
|
|
12
|
+
* @throws {Error} - Error
|
|
13
13
|
*/
|
|
14
14
|
export const throwErr = e => {
|
|
15
15
|
throw e;
|
|
@@ -27,7 +27,7 @@ export const logErr = e => {
|
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* log warn
|
|
30
|
-
* @param {
|
|
30
|
+
* @param {string|object} msg - message
|
|
31
31
|
* @returns {boolean} - false
|
|
32
32
|
*/
|
|
33
33
|
export const logWarn = msg => {
|
|
@@ -37,8 +37,8 @@ export const logWarn = msg => {
|
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
* log message
|
|
40
|
-
* @param {
|
|
41
|
-
* @returns {
|
|
40
|
+
* @param {string|object} msg - message
|
|
41
|
+
* @returns {string|object} - message
|
|
42
42
|
*/
|
|
43
43
|
export const logMsg = msg => {
|
|
44
44
|
msg && console.log(msg);
|
|
@@ -47,7 +47,7 @@ export const logMsg = msg => {
|
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
49
|
* get type
|
|
50
|
-
* @param {
|
|
50
|
+
* @param {object} o - object to check
|
|
51
51
|
* @returns {string} - type of object
|
|
52
52
|
*/
|
|
53
53
|
export const getType = o =>
|
|
@@ -55,7 +55,7 @@ export const getType = o =>
|
|
|
55
55
|
|
|
56
56
|
/**
|
|
57
57
|
* is object, and not an empty object
|
|
58
|
-
* @param {
|
|
58
|
+
* @param {object} o - object to check;
|
|
59
59
|
* @returns {boolean} - result
|
|
60
60
|
*/
|
|
61
61
|
export const isObjectNotEmpty = o => {
|
|
@@ -65,7 +65,7 @@ export const isObjectNotEmpty = o => {
|
|
|
65
65
|
|
|
66
66
|
/**
|
|
67
67
|
* is string
|
|
68
|
-
* @param {
|
|
68
|
+
* @param {object} o - object to check
|
|
69
69
|
* @returns {boolean} - result
|
|
70
70
|
*/
|
|
71
71
|
export const isString = o => typeof o === 'string' || o instanceof String;
|
package/modules/schema.js
CHANGED
|
@@ -23,13 +23,13 @@ export class Schema {
|
|
|
23
23
|
* @param {...(string|object)} [args] - optional arguments
|
|
24
24
|
* {string} - release channel.
|
|
25
25
|
* one of "beta", "central",
|
|
26
|
-
* "
|
|
26
|
+
* "esr", "mail".
|
|
27
27
|
* {object} - sinon config
|
|
28
28
|
*/
|
|
29
29
|
constructor(...args) {
|
|
30
30
|
const [arg1, arg2] = args;
|
|
31
31
|
this.#channel =
|
|
32
|
-
isString(arg1) && /(?:centra|mai)l|beta|esr
|
|
32
|
+
isString(arg1) && /(?:centra|mai)l|beta|esr/.test(arg1)
|
|
33
33
|
? arg1
|
|
34
34
|
: 'beta';
|
|
35
35
|
this._sandbox =
|
|
@@ -48,7 +48,7 @@ export class Schema {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
set channel(ch) {
|
|
51
|
-
if (isString(ch) && /(?:centra|mai)l|beta|esr
|
|
51
|
+
if (isString(ch) && /(?:centra|mai)l|beta|esr/.test(ch)) {
|
|
52
52
|
this.#channel = ch;
|
|
53
53
|
}
|
|
54
54
|
}
|
|
@@ -206,12 +206,12 @@ export class Schema {
|
|
|
206
206
|
const { $ref, properties, type, unsupported } = item;
|
|
207
207
|
if (!unsupported) {
|
|
208
208
|
$ref && this._refMap.set(`${namespace}.${key}`, { $ref, namespace });
|
|
209
|
-
if (Object.
|
|
209
|
+
if (Object.hasOwn(item, 'value')) {
|
|
210
210
|
target[key] = item.value;
|
|
211
211
|
} else if (type === 'function') {
|
|
212
212
|
target[key] = this._sandbox.stub();
|
|
213
213
|
} else if (type === 'object' || $ref ||
|
|
214
|
-
Object.
|
|
214
|
+
Object.hasOwn(item, 'properties')) {
|
|
215
215
|
target[key] ??= {};
|
|
216
216
|
properties && this._mockProperties(
|
|
217
217
|
target[key], properties, `${namespace}.${key}`
|
package/modules/update.js
CHANGED
|
@@ -51,9 +51,6 @@ export const getChannelUrl = channel => {
|
|
|
51
51
|
case 'mail':
|
|
52
52
|
dir = 'comm-central/';
|
|
53
53
|
break;
|
|
54
|
-
case 'release':
|
|
55
|
-
dir = 'releases/mozilla-release/';
|
|
56
|
-
break;
|
|
57
54
|
default:
|
|
58
55
|
dir = 'releases/mozilla-beta/';
|
|
59
56
|
}
|
|
@@ -278,7 +275,6 @@ export const updateSchemas = async (cmdOpts = {}) => {
|
|
|
278
275
|
saveSchemaFile('beta', info),
|
|
279
276
|
saveSchemaFile('central', info),
|
|
280
277
|
saveSchemaFile('esr', info),
|
|
281
|
-
saveSchemaFile('release', info),
|
|
282
278
|
saveSchemaFile('mail', info)
|
|
283
279
|
);
|
|
284
280
|
}
|
package/package.json
CHANGED
|
@@ -19,26 +19,26 @@
|
|
|
19
19
|
"types": "types/index.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"camelize": "^1.0.1",
|
|
22
|
-
"commander": "^14.0.
|
|
23
|
-
"decamelize": "^6.0.
|
|
22
|
+
"commander": "^14.0.1",
|
|
23
|
+
"decamelize": "^6.0.1",
|
|
24
24
|
"json5": "^2.2.3",
|
|
25
|
-
"sinon": "^
|
|
25
|
+
"sinon": "^21.0.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@types/firefox-webext-browser": "^120.0.
|
|
29
|
-
"@types/node": "^
|
|
28
|
+
"@types/firefox-webext-browser": "^120.0.5",
|
|
29
|
+
"@types/node": "^24.6.2",
|
|
30
30
|
"@types/sinon": "^17.0.4",
|
|
31
31
|
"c8": "^10.1.3",
|
|
32
|
-
"eslint": "^9.
|
|
33
|
-
"eslint-plugin-jsdoc": "^
|
|
34
|
-
"eslint-plugin-regexp": "^2.
|
|
35
|
-
"eslint-plugin-unicorn": "^
|
|
36
|
-
"globals": "^16.
|
|
37
|
-
"mocha": "^11.
|
|
38
|
-
"neostandard": "^0.12.
|
|
32
|
+
"eslint": "^9.37.0",
|
|
33
|
+
"eslint-plugin-jsdoc": "^60.8.0",
|
|
34
|
+
"eslint-plugin-regexp": "^2.10.0",
|
|
35
|
+
"eslint-plugin-unicorn": "^61.0.2",
|
|
36
|
+
"globals": "^16.4.0",
|
|
37
|
+
"mocha": "^11.7.4",
|
|
38
|
+
"neostandard": "^0.12.2",
|
|
39
39
|
"npm-run-all2": "^8.0.4",
|
|
40
|
-
"typescript": "^5.
|
|
41
|
-
"undici": "^7.
|
|
40
|
+
"typescript": "^5.9.3",
|
|
41
|
+
"undici": "^7.16.0"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"build": "npm run tsc && npm run lint && npm run test",
|
|
@@ -55,8 +55,7 @@
|
|
|
55
55
|
"update:beta": "node index update --channel=beta -i",
|
|
56
56
|
"update:central": "node index update --channel=central -i",
|
|
57
57
|
"update:esr": "node index update --channel=esr -i",
|
|
58
|
-
"update:mail": "node index update --channel=mail -i"
|
|
59
|
-
"update:release": "node index update --channel=release -i"
|
|
58
|
+
"update:mail": "node index update --channel=mail -i"
|
|
60
59
|
},
|
|
61
|
-
"version": "
|
|
60
|
+
"version": "6.0.0"
|
|
62
61
|
}
|
package/schemas/beta/webext.json
CHANGED
|
@@ -4434,7 +4434,6 @@
|
|
|
4434
4434
|
{
|
|
4435
4435
|
"type": "object",
|
|
4436
4436
|
"name": "queryInfo",
|
|
4437
|
-
"optional": true,
|
|
4438
4437
|
"properties": {
|
|
4439
4438
|
"collapsed": {
|
|
4440
4439
|
"type": "boolean",
|
|
@@ -4543,6 +4542,16 @@
|
|
|
4543
4542
|
{
|
|
4544
4543
|
"$ref": "TabGroup",
|
|
4545
4544
|
"name": "group"
|
|
4545
|
+
},
|
|
4546
|
+
{
|
|
4547
|
+
"type": "object",
|
|
4548
|
+
"name": "removeInfo",
|
|
4549
|
+
"properties": {
|
|
4550
|
+
"isWindowClosing": {
|
|
4551
|
+
"type": "boolean",
|
|
4552
|
+
"description": "True when the tab group is being closed because its window is being closed."
|
|
4553
|
+
}
|
|
4554
|
+
}
|
|
4546
4555
|
}
|
|
4547
4556
|
]
|
|
4548
4557
|
},
|
|
@@ -5059,6 +5068,10 @@
|
|
|
5059
5068
|
"windowId": {
|
|
5060
5069
|
"type": "integer",
|
|
5061
5070
|
"optional": true
|
|
5071
|
+
},
|
|
5072
|
+
"cookieStoreId": {
|
|
5073
|
+
"type": "string",
|
|
5074
|
+
"optional": true
|
|
5062
5075
|
}
|
|
5063
5076
|
}
|
|
5064
5077
|
}
|
|
@@ -6434,6 +6447,12 @@
|
|
|
6434
6447
|
],
|
|
6435
6448
|
"description": "The tab's new favicon URL. This property is only present if the extension's manifest includes the <code>\"tabs\"</code> permission."
|
|
6436
6449
|
},
|
|
6450
|
+
"groupId": {
|
|
6451
|
+
"type": "integer",
|
|
6452
|
+
"optional": true,
|
|
6453
|
+
"minimum": -1,
|
|
6454
|
+
"description": "The tab's new group ID. $(ref:tabGroups.TAB_GROUP_ID_NONE) (-1) if the tab no longer belongs to a tab group."
|
|
6455
|
+
},
|
|
6437
6456
|
"hidden": {
|
|
6438
6457
|
"type": "boolean",
|
|
6439
6458
|
"optional": true,
|
|
@@ -8287,6 +8306,24 @@
|
|
|
8287
8306
|
"optional": true
|
|
8288
8307
|
}
|
|
8289
8308
|
]
|
|
8309
|
+
},
|
|
8310
|
+
{
|
|
8311
|
+
"name": "onUserSettingsChanged",
|
|
8312
|
+
"type": "function",
|
|
8313
|
+
"description": "Fired when user-specified settings relating to an extension's action change.",
|
|
8314
|
+
"parameters": [
|
|
8315
|
+
{
|
|
8316
|
+
"name": "change",
|
|
8317
|
+
"type": "object",
|
|
8318
|
+
"properties": {
|
|
8319
|
+
"isOnToolbar": {
|
|
8320
|
+
"type": "boolean",
|
|
8321
|
+
"description": "Whether the extension's action icon is visible on browser windows' top-level toolbar (i.e., whether the extension has been 'pinned' by the user).",
|
|
8322
|
+
"optional": true
|
|
8323
|
+
}
|
|
8324
|
+
}
|
|
8325
|
+
}
|
|
8326
|
+
]
|
|
8290
8327
|
}
|
|
8291
8328
|
]
|
|
8292
8329
|
},
|
|
@@ -8427,6 +8464,10 @@
|
|
|
8427
8464
|
"zoomSiteSpecific": {
|
|
8428
8465
|
"$ref": "types.Setting",
|
|
8429
8466
|
"description": "This boolean setting controls whether zoom is applied on a per-site basis or to the current tab only. If privacy.resistFingerprinting is true, this setting has no effect and zoom is applied to the current tab only."
|
|
8467
|
+
},
|
|
8468
|
+
"verticalTabs": {
|
|
8469
|
+
"$ref": "types.Setting",
|
|
8470
|
+
"description": "This boolean setting controls whether vertical tabs are enabled."
|
|
8430
8471
|
}
|
|
8431
8472
|
}
|
|
8432
8473
|
},
|
|
@@ -9081,6 +9122,11 @@
|
|
|
9081
9122
|
"optional": true,
|
|
9082
9123
|
"description": "The JavaScript world for a script to execute within. Defaults to \"ISOLATED\"."
|
|
9083
9124
|
},
|
|
9125
|
+
"cssOrigin": {
|
|
9126
|
+
"$ref": "extensionTypes.CSSOrigin",
|
|
9127
|
+
"optional": true,
|
|
9128
|
+
"description": "The css origin of the stylesheet to inject. Defaults to \"author\"."
|
|
9129
|
+
},
|
|
9084
9130
|
"cookieStoreId": {
|
|
9085
9131
|
"choices": [
|
|
9086
9132
|
{
|
|
@@ -9410,6 +9456,7 @@
|
|
|
9410
9456
|
"id": "SameSiteStatus",
|
|
9411
9457
|
"type": "string",
|
|
9412
9458
|
"enum": [
|
|
9459
|
+
"unspecified",
|
|
9413
9460
|
"no_restriction",
|
|
9414
9461
|
"lax",
|
|
9415
9462
|
"strict"
|
|
@@ -9703,7 +9750,7 @@
|
|
|
9703
9750
|
"$ref": "SameSiteStatus",
|
|
9704
9751
|
"optional": true,
|
|
9705
9752
|
"description": "The cookie's same-site status.",
|
|
9706
|
-
"default": "
|
|
9753
|
+
"default": "unspecified"
|
|
9707
9754
|
},
|
|
9708
9755
|
"expirationDate": {
|
|
9709
9756
|
"type": "number",
|
|
@@ -9957,7 +10004,7 @@
|
|
|
9957
10004
|
{
|
|
9958
10005
|
"id": "ResourceType",
|
|
9959
10006
|
"type": "string",
|
|
9960
|
-
"description": "How the requested resource will be used. Comparable to the webRequest.ResourceType type.",
|
|
10007
|
+
"description": "How the requested resource will be used. Comparable to the webRequest.ResourceType type. object_subrequest is unsupported.",
|
|
9961
10008
|
"enum": [
|
|
9962
10009
|
"main_frame",
|
|
9963
10010
|
"sub_frame",
|
|
@@ -12528,7 +12575,8 @@
|
|
|
12528
12575
|
"user",
|
|
12529
12576
|
"author"
|
|
12530
12577
|
],
|
|
12531
|
-
"description": "The origin of the CSS to inject, this affects the cascading order (priority) of the stylesheet."
|
|
12578
|
+
"description": "The origin of the CSS to inject, this affects the cascading order (priority) of the stylesheet.",
|
|
12579
|
+
"preprocess": "stringToLowerCase"
|
|
12532
12580
|
},
|
|
12533
12581
|
{
|
|
12534
12582
|
"id": "InjectDetails",
|
|
@@ -12570,6 +12618,7 @@
|
|
|
12570
12618
|
"cssOrigin": {
|
|
12571
12619
|
"$ref": "CSSOrigin",
|
|
12572
12620
|
"optional": true,
|
|
12621
|
+
"default": "author",
|
|
12573
12622
|
"description": "The css origin of the stylesheet to inject. Defaults to \"author\"."
|
|
12574
12623
|
}
|
|
12575
12624
|
}
|
|
@@ -13019,6 +13068,28 @@
|
|
|
13019
13068
|
"description": "Message localized for current locale."
|
|
13020
13069
|
}
|
|
13021
13070
|
},
|
|
13071
|
+
{
|
|
13072
|
+
"name": "getPreferredSystemLanguages",
|
|
13073
|
+
"type": "function",
|
|
13074
|
+
"async": "callback",
|
|
13075
|
+
"description": "Gets the preferred locales of the operating system. This is different from the locales set in the browser; to get those, use $(ref:i18n.getAcceptLanguages).",
|
|
13076
|
+
"parameters": [
|
|
13077
|
+
{
|
|
13078
|
+
"type": "function",
|
|
13079
|
+
"name": "callback",
|
|
13080
|
+
"parameters": [
|
|
13081
|
+
{
|
|
13082
|
+
"name": "languages",
|
|
13083
|
+
"type": "array",
|
|
13084
|
+
"items": {
|
|
13085
|
+
"$ref": "LanguageCode"
|
|
13086
|
+
},
|
|
13087
|
+
"description": "Array of LanguageCode"
|
|
13088
|
+
}
|
|
13089
|
+
]
|
|
13090
|
+
}
|
|
13091
|
+
]
|
|
13092
|
+
},
|
|
13022
13093
|
{
|
|
13023
13094
|
"name": "getUILanguage",
|
|
13024
13095
|
"type": "function",
|
|
@@ -14323,12 +14394,13 @@
|
|
|
14323
14394
|
"enum": [
|
|
14324
14395
|
"authenticationInfo",
|
|
14325
14396
|
"bookmarksInfo",
|
|
14326
|
-
"
|
|
14397
|
+
"browsingActivity",
|
|
14327
14398
|
"financialAndPaymentInfo",
|
|
14328
14399
|
"healthInfo",
|
|
14329
14400
|
"locationInfo",
|
|
14330
14401
|
"personalCommunications",
|
|
14331
14402
|
"personallyIdentifyingInfo",
|
|
14403
|
+
"searchTerms",
|
|
14332
14404
|
"websiteActivity",
|
|
14333
14405
|
"websiteContent"
|
|
14334
14406
|
]
|
|
@@ -14487,6 +14559,11 @@
|
|
|
14487
14559
|
},
|
|
14488
14560
|
"optional": true,
|
|
14489
14561
|
"default": []
|
|
14562
|
+
},
|
|
14563
|
+
"has_previous_consent": {
|
|
14564
|
+
"type": "boolean",
|
|
14565
|
+
"optional": true,
|
|
14566
|
+
"default": false
|
|
14490
14567
|
}
|
|
14491
14568
|
}
|
|
14492
14569
|
}
|
|
@@ -14634,6 +14711,11 @@
|
|
|
14634
14711
|
"$ref": "ExtensionURL"
|
|
14635
14712
|
}
|
|
14636
14713
|
},
|
|
14714
|
+
"css_origin": {
|
|
14715
|
+
"$ref": "extensionTypes.CSSOrigin",
|
|
14716
|
+
"default": "author",
|
|
14717
|
+
"optional": true
|
|
14718
|
+
},
|
|
14637
14719
|
"js": {
|
|
14638
14720
|
"type": "array",
|
|
14639
14721
|
"optional": true,
|
|
@@ -16536,6 +16618,7 @@
|
|
|
16536
16618
|
"aarch64",
|
|
16537
16619
|
"arm",
|
|
16538
16620
|
"ppc64",
|
|
16621
|
+
"riscv64",
|
|
16539
16622
|
"s390x",
|
|
16540
16623
|
"sparc64",
|
|
16541
16624
|
"x86-32",
|
|
@@ -17568,6 +17651,10 @@
|
|
|
17568
17651
|
"items": {
|
|
17569
17652
|
"$ref": "manifest.ExtensionURL"
|
|
17570
17653
|
}
|
|
17654
|
+
},
|
|
17655
|
+
"cssOrigin": {
|
|
17656
|
+
"$ref": "extensionTypes.CSSOrigin",
|
|
17657
|
+
"optional": true
|
|
17571
17658
|
}
|
|
17572
17659
|
}
|
|
17573
17660
|
}
|
|
@@ -17825,7 +17912,6 @@
|
|
|
17825
17912
|
},
|
|
17826
17913
|
{
|
|
17827
17914
|
"name": "getBytesInUse",
|
|
17828
|
-
"unsupported": true,
|
|
17829
17915
|
"type": "function",
|
|
17830
17916
|
"description": "Gets the amount of space (in bytes) being used by one or more items.",
|
|
17831
17917
|
"async": "callback",
|
|
@@ -17861,173 +17947,23 @@
|
|
|
17861
17947
|
]
|
|
17862
17948
|
},
|
|
17863
17949
|
{
|
|
17864
|
-
"name": "
|
|
17950
|
+
"name": "getKeys",
|
|
17865
17951
|
"type": "function",
|
|
17866
|
-
"description": "
|
|
17952
|
+
"description": "Gets the keys of all items in storage.",
|
|
17867
17953
|
"async": "callback",
|
|
17868
17954
|
"parameters": [
|
|
17869
|
-
{
|
|
17870
|
-
"name": "items",
|
|
17871
|
-
"type": "object",
|
|
17872
|
-
"additionalProperties": {
|
|
17873
|
-
"type": "any"
|
|
17874
|
-
},
|
|
17875
|
-
"description": "<p>An object which gives each key/value pair to update storage with. Any other key/value pairs in storage will not be affected.</p><p>Primitive values such as numbers will serialize as expected. Values with a <code>typeof</code> <code>\"object\"</code> and <code>\"function\"</code> will typically serialize to <code>{}</code>, with the exception of <code>Array</code> (serializes as expected), <code>Date</code>, and <code>Regex</code> (serialize using their <code>String</code> representation).</p>"
|
|
17876
|
-
},
|
|
17877
17955
|
{
|
|
17878
17956
|
"name": "callback",
|
|
17879
17957
|
"type": "function",
|
|
17880
|
-
"description": "Callback
|
|
17881
|
-
"parameters": [],
|
|
17882
|
-
"optional": true
|
|
17883
|
-
}
|
|
17884
|
-
]
|
|
17885
|
-
},
|
|
17886
|
-
{
|
|
17887
|
-
"name": "remove",
|
|
17888
|
-
"type": "function",
|
|
17889
|
-
"description": "Removes one or more items from storage.",
|
|
17890
|
-
"async": "callback",
|
|
17891
|
-
"parameters": [
|
|
17892
|
-
{
|
|
17893
|
-
"name": "keys",
|
|
17894
|
-
"choices": [
|
|
17895
|
-
{
|
|
17896
|
-
"type": "string"
|
|
17897
|
-
},
|
|
17898
|
-
{
|
|
17899
|
-
"type": "array",
|
|
17900
|
-
"items": {
|
|
17901
|
-
"type": "string"
|
|
17902
|
-
}
|
|
17903
|
-
}
|
|
17904
|
-
],
|
|
17905
|
-
"description": "A single key or a list of keys for items to remove."
|
|
17906
|
-
},
|
|
17907
|
-
{
|
|
17908
|
-
"name": "callback",
|
|
17909
|
-
"type": "function",
|
|
17910
|
-
"description": "Callback on success, or on failure (in which case $(ref:runtime.lastError) will be set).",
|
|
17911
|
-
"parameters": [],
|
|
17912
|
-
"optional": true
|
|
17913
|
-
}
|
|
17914
|
-
]
|
|
17915
|
-
},
|
|
17916
|
-
{
|
|
17917
|
-
"name": "clear",
|
|
17918
|
-
"type": "function",
|
|
17919
|
-
"description": "Removes all items from storage.",
|
|
17920
|
-
"async": "callback",
|
|
17921
|
-
"parameters": [
|
|
17922
|
-
{
|
|
17923
|
-
"name": "callback",
|
|
17924
|
-
"type": "function",
|
|
17925
|
-
"description": "Callback on success, or on failure (in which case $(ref:runtime.lastError) will be set).",
|
|
17926
|
-
"parameters": [],
|
|
17927
|
-
"optional": true
|
|
17928
|
-
}
|
|
17929
|
-
]
|
|
17930
|
-
}
|
|
17931
|
-
],
|
|
17932
|
-
"events": [
|
|
17933
|
-
{
|
|
17934
|
-
"name": "onChanged",
|
|
17935
|
-
"type": "function",
|
|
17936
|
-
"description": "Fired when one or more items change.",
|
|
17937
|
-
"parameters": [
|
|
17938
|
-
{
|
|
17939
|
-
"name": "changes",
|
|
17940
|
-
"type": "object",
|
|
17941
|
-
"additionalProperties": {
|
|
17942
|
-
"$ref": "StorageChange"
|
|
17943
|
-
},
|
|
17944
|
-
"description": "Object mapping each key that changed to its corresponding $(ref:storage.StorageChange) for that item."
|
|
17945
|
-
}
|
|
17946
|
-
]
|
|
17947
|
-
}
|
|
17948
|
-
]
|
|
17949
|
-
},
|
|
17950
|
-
{
|
|
17951
|
-
"id": "StorageAreaWithUsage",
|
|
17952
|
-
"type": "object",
|
|
17953
|
-
"functions": [
|
|
17954
|
-
{
|
|
17955
|
-
"name": "get",
|
|
17956
|
-
"type": "function",
|
|
17957
|
-
"description": "Gets one or more items from storage.",
|
|
17958
|
-
"async": "callback",
|
|
17959
|
-
"parameters": [
|
|
17960
|
-
{
|
|
17961
|
-
"name": "keys",
|
|
17962
|
-
"choices": [
|
|
17963
|
-
{
|
|
17964
|
-
"type": "string"
|
|
17965
|
-
},
|
|
17966
|
-
{
|
|
17967
|
-
"type": "array",
|
|
17968
|
-
"items": {
|
|
17969
|
-
"type": "string"
|
|
17970
|
-
}
|
|
17971
|
-
},
|
|
17972
|
-
{
|
|
17973
|
-
"type": "object",
|
|
17974
|
-
"description": "Storage items to return in the callback, where the values are replaced with those from storage if they exist.",
|
|
17975
|
-
"additionalProperties": {
|
|
17976
|
-
"type": "any"
|
|
17977
|
-
}
|
|
17978
|
-
}
|
|
17979
|
-
],
|
|
17980
|
-
"description": "A single key to get, list of keys to get, or a dictionary specifying default values (see description of the object). An empty list or object will return an empty result object. Pass in <code>null</code> to get the entire contents of storage.",
|
|
17981
|
-
"optional": true
|
|
17982
|
-
},
|
|
17983
|
-
{
|
|
17984
|
-
"name": "callback",
|
|
17985
|
-
"type": "function",
|
|
17986
|
-
"description": "Callback with storage items, or on failure (in which case $(ref:runtime.lastError) will be set).",
|
|
17958
|
+
"description": "Callback with the keys of all items in storage, or on failure (in which case $(ref:runtime.lastError) will be set).",
|
|
17987
17959
|
"parameters": [
|
|
17988
17960
|
{
|
|
17989
|
-
"name": "
|
|
17990
|
-
"type": "object",
|
|
17991
|
-
"additionalProperties": {
|
|
17992
|
-
"type": "any"
|
|
17993
|
-
},
|
|
17994
|
-
"description": "Object with items in their key-value mappings."
|
|
17995
|
-
}
|
|
17996
|
-
]
|
|
17997
|
-
}
|
|
17998
|
-
]
|
|
17999
|
-
},
|
|
18000
|
-
{
|
|
18001
|
-
"name": "getBytesInUse",
|
|
18002
|
-
"type": "function",
|
|
18003
|
-
"description": "Gets the amount of space (in bytes) being used by one or more items.",
|
|
18004
|
-
"async": "callback",
|
|
18005
|
-
"parameters": [
|
|
18006
|
-
{
|
|
18007
|
-
"name": "keys",
|
|
18008
|
-
"choices": [
|
|
18009
|
-
{
|
|
18010
|
-
"type": "string"
|
|
18011
|
-
},
|
|
18012
|
-
{
|
|
17961
|
+
"name": "keys",
|
|
18013
17962
|
"type": "array",
|
|
18014
17963
|
"items": {
|
|
18015
17964
|
"type": "string"
|
|
18016
|
-
}
|
|
18017
|
-
|
|
18018
|
-
],
|
|
18019
|
-
"description": "A single key or list of keys to get the total usage for. An empty list will return 0. Pass in <code>null</code> to get the total usage of all of storage.",
|
|
18020
|
-
"optional": true
|
|
18021
|
-
},
|
|
18022
|
-
{
|
|
18023
|
-
"name": "callback",
|
|
18024
|
-
"type": "function",
|
|
18025
|
-
"description": "Callback with the amount of space being used by storage, or on failure (in which case $(ref:runtime.lastError) will be set).",
|
|
18026
|
-
"parameters": [
|
|
18027
|
-
{
|
|
18028
|
-
"name": "bytesInUse",
|
|
18029
|
-
"type": "integer",
|
|
18030
|
-
"description": "Amount of space being used in storage, in bytes."
|
|
17965
|
+
},
|
|
17966
|
+
"description": "The keys of all items in storage."
|
|
18031
17967
|
}
|
|
18032
17968
|
]
|
|
18033
17969
|
}
|
|
@@ -18145,7 +18081,7 @@
|
|
|
18145
18081
|
],
|
|
18146
18082
|
"properties": {
|
|
18147
18083
|
"sync": {
|
|
18148
|
-
"$ref": "
|
|
18084
|
+
"$ref": "StorageArea",
|
|
18149
18085
|
"description": "Items in the <code>sync</code> storage area are synced by the browser.",
|
|
18150
18086
|
"properties": {
|
|
18151
18087
|
"QUOTA_BYTES": {
|
|
@@ -18199,7 +18135,7 @@
|
|
|
18199
18135
|
"allowedContexts": [
|
|
18200
18136
|
"devtools"
|
|
18201
18137
|
],
|
|
18202
|
-
"$ref": "
|
|
18138
|
+
"$ref": "StorageArea",
|
|
18203
18139
|
"description": "Items in the <code>session</code> storage area are kept in memory, and only until the either browser or extension is closed or reloaded.",
|
|
18204
18140
|
"properties": {
|
|
18205
18141
|
"QUOTA_BYTES": {
|
|
@@ -20906,7 +20842,6 @@
|
|
|
20906
20842
|
"script",
|
|
20907
20843
|
"image",
|
|
20908
20844
|
"object",
|
|
20909
|
-
"object_subrequest",
|
|
20910
20845
|
"xmlhttprequest",
|
|
20911
20846
|
"xslt",
|
|
20912
20847
|
"ping",
|
|
@@ -21333,7 +21268,6 @@
|
|
|
21333
21268
|
"cryptomining_content",
|
|
21334
21269
|
"emailtracking",
|
|
21335
21270
|
"emailtracking_content",
|
|
21336
|
-
"consentmanager",
|
|
21337
21271
|
"tracking",
|
|
21338
21272
|
"tracking_ad",
|
|
21339
21273
|
"tracking_analytics",
|
|
@@ -21341,7 +21275,9 @@
|
|
|
21341
21275
|
"tracking_content",
|
|
21342
21276
|
"any_basic_tracking",
|
|
21343
21277
|
"any_strict_tracking",
|
|
21344
|
-
"any_social_tracking"
|
|
21278
|
+
"any_social_tracking",
|
|
21279
|
+
"consentmanager",
|
|
21280
|
+
"antifraud"
|
|
21345
21281
|
],
|
|
21346
21282
|
"description": "Tracking flags that match our internal tracking classification"
|
|
21347
21283
|
},
|