@wxt-dev/browser 0.2.5 → 0.2.7
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 +2 -2
- package/src/gen/index.d.ts +122 -81
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wxt-dev/browser",
|
|
3
3
|
"description": "Provides a cross-browser API for using extension APIs and types based on @types/chrome",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.7",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.mjs",
|
|
7
7
|
"types": "src/index.d.ts",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"src"
|
|
26
26
|
],
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@types/chrome": "0.2.
|
|
28
|
+
"@types/chrome": "0.2.7",
|
|
29
29
|
"@types/node": "^22",
|
|
30
30
|
"typescript": "^6.0.3",
|
|
31
31
|
"vitest": "^4.1.10"
|
package/src/gen/index.d.ts
CHANGED
|
@@ -170,7 +170,7 @@ export namespace Browser {
|
|
|
170
170
|
interface TitleDetails {
|
|
171
171
|
/** The string the action should display when moused over. */
|
|
172
172
|
title: string;
|
|
173
|
-
/** Limits the change to when a particular tab is selected. Automatically resets when the tab is closed.
|
|
173
|
+
/** Limits the change to when a particular tab is selected. Automatically resets when the tab is closed. */
|
|
174
174
|
tabId?: number | undefined;
|
|
175
175
|
}
|
|
176
176
|
|
|
@@ -203,12 +203,12 @@ export namespace Browser {
|
|
|
203
203
|
|
|
204
204
|
/** @since Chrome 99 */
|
|
205
205
|
interface OpenPopupOptions {
|
|
206
|
-
/** The id of the window to open the action popup in. Defaults to the currently-active window if unspecified.
|
|
206
|
+
/** The id of the window to open the action popup in. Defaults to the currently-active window if unspecified. */
|
|
207
207
|
windowId?: number | undefined;
|
|
208
208
|
}
|
|
209
209
|
|
|
210
210
|
interface TabDetails {
|
|
211
|
-
/** The ID of the tab to query state for. If no tab is specified, the non-tab-specific state is returned.
|
|
211
|
+
/** The ID of the tab to query state for. If no tab is specified, the non-tab-specific state is returned. */
|
|
212
212
|
tabId?: number | undefined;
|
|
213
213
|
}
|
|
214
214
|
|
|
@@ -404,7 +404,7 @@ export namespace Browser {
|
|
|
404
404
|
}
|
|
405
405
|
& (
|
|
406
406
|
| {
|
|
407
|
-
/** Length of time in minutes after which the {@link onAlarm} event should fire.
|
|
407
|
+
/** Length of time in minutes after which the {@link onAlarm} event should fire. */
|
|
408
408
|
delayInMinutes: number;
|
|
409
409
|
/** If set, the onAlarm event should fire every `periodInMinutes` minutes after the initial event specified by `when` or `delayInMinutes`. If not set, the alarm will only fire once. */
|
|
410
410
|
periodInMinutes?: number | undefined;
|
|
@@ -412,7 +412,7 @@ export namespace Browser {
|
|
|
412
412
|
when?: undefined;
|
|
413
413
|
}
|
|
414
414
|
| {
|
|
415
|
-
/** Length of time in minutes after which the {@link onAlarm} event should fire.
|
|
415
|
+
/** Length of time in minutes after which the {@link onAlarm} event should fire. */
|
|
416
416
|
delayInMinutes?: number | undefined;
|
|
417
417
|
/** If set, the onAlarm event should fire every `periodInMinutes` minutes after the initial event specified by `when` or `delayInMinutes`. If not set, the alarm will only fire once. */
|
|
418
418
|
periodInMinutes: number;
|
|
@@ -420,7 +420,7 @@ export namespace Browser {
|
|
|
420
420
|
when?: undefined;
|
|
421
421
|
}
|
|
422
422
|
| {
|
|
423
|
-
/** Length of time in minutes after which the {@link onAlarm} event should fire.
|
|
423
|
+
/** Length of time in minutes after which the {@link onAlarm} event should fire. */
|
|
424
424
|
delayInMinutes?: undefined;
|
|
425
425
|
/** If set, the onAlarm event should fire every `periodInMinutes` minutes after the initial event specified by `when` or `delayInMinutes`. If not set, the alarm will only fire once. */
|
|
426
426
|
periodInMinutes?: number | undefined;
|
|
@@ -835,7 +835,7 @@ export namespace Browser {
|
|
|
835
835
|
function removeTree(id: string, callback: () => void): void;
|
|
836
836
|
|
|
837
837
|
interface SearchQuery {
|
|
838
|
-
/** A string of words and quoted phrases that are matched against bookmark URLs and titles
|
|
838
|
+
/** A string of words and quoted phrases that are matched against bookmark URLs and titles. */
|
|
839
839
|
query?: string;
|
|
840
840
|
/** The URL of the bookmark; matches verbatim. Note that folders have no URL. */
|
|
841
841
|
url?: string;
|
|
@@ -865,7 +865,7 @@ export namespace Browser {
|
|
|
865
865
|
function update(id: string, changes: UpdateChanges): Promise<BookmarkTreeNode>;
|
|
866
866
|
function update(id: string, changes: UpdateChanges, callback: (result: BookmarkTreeNode) => void): void;
|
|
867
867
|
|
|
868
|
-
/** Fired when a bookmark or folder changes. **Note:** Currently, only title and url changes trigger this
|
|
868
|
+
/** Fired when a bookmark or folder changes. **Note:** Currently, only title and url changes trigger this. */
|
|
869
869
|
const onChanged: events.Event<(id: string, changeInfo: { title: string; url?: string }) => void>;
|
|
870
870
|
|
|
871
871
|
/** Fired when the children of a folder have changed their order due to the order being sorted in the UI. This is not called as a result of a move(). */
|
|
@@ -877,7 +877,7 @@ export namespace Browser {
|
|
|
877
877
|
/** Fired when a bookmark import session is begun. Expensive observers should ignore onCreated updates until onImportEnded is fired. Observers should still handle other notifications immediately. */
|
|
878
878
|
const onImportBegan: events.Event<() => void>;
|
|
879
879
|
|
|
880
|
-
/** Fired when a bookmark import session is ended.
|
|
880
|
+
/** Fired when a bookmark import session is ended. */
|
|
881
881
|
const onImportEnded: events.Event<() => void>;
|
|
882
882
|
|
|
883
883
|
/** Fired when a bookmark or folder is moved to a different parent folder. */
|
|
@@ -935,7 +935,7 @@ export namespace Browser {
|
|
|
935
935
|
interface TitleDetails {
|
|
936
936
|
/** The string the browser action should display when moused over. */
|
|
937
937
|
title: string;
|
|
938
|
-
/** Optional. Limits the change to when a particular tab is selected. Automatically resets when the tab is closed.
|
|
938
|
+
/** Optional. Limits the change to when a particular tab is selected. Automatically resets when the tab is closed. */
|
|
939
939
|
tabId?: number | null | undefined;
|
|
940
940
|
}
|
|
941
941
|
|
|
@@ -967,7 +967,7 @@ export namespace Browser {
|
|
|
967
967
|
interface PopupDetails {
|
|
968
968
|
/** Limits the change to when a particular tab is selected. Automatically resets when the tab is closed. */
|
|
969
969
|
tabId?: number | null | undefined;
|
|
970
|
-
/** The relative path to the HTML file to show in a popup. If set to the empty string (`''`), no popup is shown
|
|
970
|
+
/** The relative path to the HTML file to show in a popup. If set to the empty string (`''`), no popup is shown. */
|
|
971
971
|
popup: string;
|
|
972
972
|
}
|
|
973
973
|
|
|
@@ -1331,7 +1331,7 @@ export namespace Browser {
|
|
|
1331
1331
|
GENERAL_ERROR = "GENERAL_ERROR",
|
|
1332
1332
|
}
|
|
1333
1333
|
|
|
1334
|
-
/** @deprecated Replaced by {@link Algorithm}
|
|
1334
|
+
/** @deprecated Replaced by {@link Algorithm}. */
|
|
1335
1335
|
enum Hash {
|
|
1336
1336
|
/** Specifies the MD5 and SHA1 hashing algorithms. */
|
|
1337
1337
|
MD5_SHA1 = "MD5_SHA1",
|
|
@@ -1409,7 +1409,7 @@ export namespace Browser {
|
|
|
1409
1409
|
error?: `${Error}` | undefined;
|
|
1410
1410
|
}
|
|
1411
1411
|
|
|
1412
|
-
/**
|
|
1412
|
+
/** @since Chrome 86 */
|
|
1413
1413
|
interface SignatureRequest {
|
|
1414
1414
|
/** Signature algorithm to be used. */
|
|
1415
1415
|
algorithm: `${Algorithm}`;
|
|
@@ -1424,7 +1424,7 @@ export namespace Browser {
|
|
|
1424
1424
|
interface SignRequest {
|
|
1425
1425
|
/** The DER encoding of a X.509 certificate. The extension must sign `digest` using the associated private key. */
|
|
1426
1426
|
certificate: ArrayBuffer;
|
|
1427
|
-
/**
|
|
1427
|
+
/** The digest that must be signed. */
|
|
1428
1428
|
digest: ArrayBuffer;
|
|
1429
1429
|
/** Refers to the hash algorithm that was used to create `digest`. */
|
|
1430
1430
|
hash: `${Hash}`;
|
|
@@ -1591,7 +1591,7 @@ export namespace Browser {
|
|
|
1591
1591
|
resourceIdentifier?: ResourceIdentifier;
|
|
1592
1592
|
/** Where to set the setting (default: regular). */
|
|
1593
1593
|
scope?: `${Scope}`;
|
|
1594
|
-
/** The pattern for the secondary URL. Defaults to matching all URLs. For details on the format of a pattern, see Content Setting Patterns
|
|
1594
|
+
/** The pattern for the secondary URL. Defaults to matching all URLs. For details on the format of a pattern, see Content Setting Patterns. */
|
|
1595
1595
|
secondaryPattern?: string;
|
|
1596
1596
|
/** The setting applied by this rule. See the description of the individual ContentSetting objects for the possible values. */
|
|
1597
1597
|
setting: T;
|
|
@@ -1702,7 +1702,7 @@ export namespace Browser {
|
|
|
1702
1702
|
|
|
1703
1703
|
/** The only content type using resource identifiers is contentSettings.plugins. For more information, see Resource Identifiers. */
|
|
1704
1704
|
interface ResourceIdentifier {
|
|
1705
|
-
/** A human readable description of the resource.
|
|
1705
|
+
/** A human readable description of the resource. */
|
|
1706
1706
|
description?: string;
|
|
1707
1707
|
/** The resource identifier for the given content type. */
|
|
1708
1708
|
id: string;
|
|
@@ -1941,15 +1941,15 @@ export namespace Browser {
|
|
|
1941
1941
|
checked?: boolean;
|
|
1942
1942
|
/** List of contexts this menu item will appear in. Defaults to `['page']`. */
|
|
1943
1943
|
contexts?: [`${ContextType}`, ...`${ContextType}`[]];
|
|
1944
|
-
/** Restricts the item to apply only to documents or frames whose URL matches one of the given patterns. For details on pattern formats, see Match Patterns.
|
|
1944
|
+
/** Restricts the item to apply only to documents or frames whose URL matches one of the given patterns. For details on pattern formats, see Match Patterns. */
|
|
1945
1945
|
documentUrlPatterns?: string[];
|
|
1946
|
-
/**
|
|
1946
|
+
/** Whether this context menu item is enabled or disabled. Defaults to `true`. */
|
|
1947
1947
|
enabled?: boolean;
|
|
1948
1948
|
/** The unique ID to assign to this item. Mandatory for event pages. Cannot be the same as another ID for this extension. */
|
|
1949
1949
|
id?: string;
|
|
1950
|
-
/**
|
|
1950
|
+
/** The ID of a parent menu item; this makes the item a child of a previously added item. */
|
|
1951
1951
|
parentId?: number | string;
|
|
1952
|
-
/**
|
|
1952
|
+
/** Similar to `documentUrlPatterns`, filters based on the `src` attribute of `img`, `audio`, and `video` tags and the `href` attribute of `a` tags. */
|
|
1953
1953
|
targetUrlPatterns?: string[];
|
|
1954
1954
|
/** The text to display in the item; this is _required_ unless `type` is `separator`. When the context is `selection`, use `%s` within the string to show the selected text. For example, if this parameter's value is "Translate '%s' to Pig Latin" and the user selects the word "cool", the context menu item for the selection is "Translate 'cool' to Pig Latin". */
|
|
1955
1955
|
title?: string;
|
|
@@ -1983,7 +1983,7 @@ export namespace Browser {
|
|
|
1983
1983
|
interface OnClickData {
|
|
1984
1984
|
/** A flag indicating the state of a checkbox or radio item after it is clicked. */
|
|
1985
1985
|
checked?: boolean;
|
|
1986
|
-
/**
|
|
1986
|
+
/** A flag indicating whether the element is editable (text input, textarea, etc.). */
|
|
1987
1987
|
editable: boolean;
|
|
1988
1988
|
/**
|
|
1989
1989
|
* The ID of the frame of the element where the context menu was clicked, if it was in a frame.
|
|
@@ -2000,7 +2000,7 @@ export namespace Browser {
|
|
|
2000
2000
|
menuItemId: number | string;
|
|
2001
2001
|
/** The URL of the page where the menu item was clicked. This property is not set if the click occurred in a context where there is no current page, such as in a launcher context menu. */
|
|
2002
2002
|
pageUrl?: string;
|
|
2003
|
-
/** The parent ID, if any, for the item clicked
|
|
2003
|
+
/** The parent ID, if any, for the item clicked. */
|
|
2004
2004
|
parentMenuItemId?: number | string;
|
|
2005
2005
|
/** The text for the context selection, if any. */
|
|
2006
2006
|
selectionText?: string | undefined;
|
|
@@ -2065,7 +2065,7 @@ export namespace Browser {
|
|
|
2065
2065
|
* Manifest: "host_permissions"
|
|
2066
2066
|
*/
|
|
2067
2067
|
export namespace cookies {
|
|
2068
|
-
/** A cookie's 'SameSite' state (https://tools.ietf.org/html/draft-west-first-party-cookies). 'no_restriction' corresponds to a cookie set with 'SameSite=None', 'lax' to 'SameSite=Lax', and 'strict' to 'SameSite=Strict'. 'unspecified' corresponds to a cookie set without the SameSite attribute.
|
|
2068
|
+
/** A cookie's 'SameSite' state (https://tools.ietf.org/html/draft-west-first-party-cookies). 'no_restriction' corresponds to a cookie set with 'SameSite=None', 'lax' to 'SameSite=Lax', and 'strict' to 'SameSite=Strict'. 'unspecified' corresponds to a cookie set without the SameSite attribute. */
|
|
2069
2069
|
enum SameSiteStatus {
|
|
2070
2070
|
NO_RESTRICTION = "no_restriction",
|
|
2071
2071
|
LAX = "lax",
|
|
@@ -2316,7 +2316,7 @@ export namespace Browser {
|
|
|
2316
2316
|
* @since Chrome 125
|
|
2317
2317
|
*/
|
|
2318
2318
|
interface DebuggerSession {
|
|
2319
|
-
/** The id of the extension which you intend to debug. Attaching to an extension background page is only possible when the `--silent-debugger-extension-api` command-line switch is used
|
|
2319
|
+
/** The id of the extension which you intend to debug. Attaching to an extension background page is only possible when the `--silent-debugger-extension-api` command-line switch is used. */
|
|
2320
2320
|
extensionId?: string;
|
|
2321
2321
|
/** The opaque id of the Chrome DevTools Protocol session. Identifies a child session within the root session identified by tabId, extensionId or targetId. */
|
|
2322
2322
|
sessionId?: string;
|
|
@@ -2351,7 +2351,7 @@ export namespace Browser {
|
|
|
2351
2351
|
title: string;
|
|
2352
2352
|
/** Target URL. */
|
|
2353
2353
|
url: string;
|
|
2354
|
-
/** Target favicon URL.
|
|
2354
|
+
/** Target favicon URL. */
|
|
2355
2355
|
faviconUrl?: string;
|
|
2356
2356
|
}
|
|
2357
2357
|
|
|
@@ -2852,7 +2852,7 @@ export namespace Browser {
|
|
|
2852
2852
|
getContent(): Promise<{
|
|
2853
2853
|
/** Content of the resource (potentially encoded). */
|
|
2854
2854
|
content: string;
|
|
2855
|
-
/** Empty if the content is not encoded, encoding name otherwise. Currently, only base64 is supported
|
|
2855
|
+
/** Empty if the content is not encoded, encoding name otherwise. Currently, only base64 is supported. */
|
|
2856
2856
|
encoding: string;
|
|
2857
2857
|
}>;
|
|
2858
2858
|
getContent(
|
|
@@ -3384,7 +3384,7 @@ export namespace Browser {
|
|
|
3384
3384
|
enum OperationResult {
|
|
3385
3385
|
/** An unknown or generic failure occurred. */
|
|
3386
3386
|
UNKNOWN = "UNKNOWN",
|
|
3387
|
-
/**The operation succeeded. */
|
|
3387
|
+
/** The operation succeeded. */
|
|
3388
3388
|
SUCCESS = "SUCCESS",
|
|
3389
3389
|
/** The operation is not supported. */
|
|
3390
3390
|
UNSUPPORTED = "UNSUPPORTED",
|
|
@@ -3567,7 +3567,7 @@ export namespace Browser {
|
|
|
3567
3567
|
|
|
3568
3568
|
/** @since Chrome 125 */
|
|
3569
3569
|
interface SetOptionResult {
|
|
3570
|
-
/**
|
|
3570
|
+
/** Indicates the name of the option that was set. */
|
|
3571
3571
|
name: string;
|
|
3572
3572
|
/** Indicates the result of setting the option. */
|
|
3573
3573
|
result: `${OperationResult}`;
|
|
@@ -3599,7 +3599,7 @@ export namespace Browser {
|
|
|
3599
3599
|
interface StartScanResponse<T> {
|
|
3600
3600
|
/** If `result` is `SUCCESS`, provides a handle that can be used to read scan data or cancel the job. */
|
|
3601
3601
|
job?: string;
|
|
3602
|
-
/**
|
|
3602
|
+
/** The result of starting a scan. If the value of this is `SUCCESS`, the `job` property will be populated. */
|
|
3603
3603
|
result: `${OperationResult}`;
|
|
3604
3604
|
/** Provides the same scanner handle that was passed to {@link startScan}. */
|
|
3605
3605
|
scannerHandle: T;
|
|
@@ -4744,6 +4744,25 @@ export namespace Browser {
|
|
|
4744
4744
|
*/
|
|
4745
4745
|
type CSSOrigin = "author" | "user";
|
|
4746
4746
|
|
|
4747
|
+
/**
|
|
4748
|
+
* Details of the CSS to remove. Either the code or the file property must be set, but both may not be set at the same time.
|
|
4749
|
+
* @since Chrome 87
|
|
4750
|
+
*/
|
|
4751
|
+
interface DeleteInjectionDetails {
|
|
4752
|
+
/** If allFrames is `true`, implies that the CSS should be removed from all frames of current page. By default, it's `false` and is only removed from the top frame. If `true` and `frameId` is set, then the code is removed from the selected frame and all of its child frames. */
|
|
4753
|
+
allFrames?: boolean;
|
|
4754
|
+
/** CSS code to remove. */
|
|
4755
|
+
code?: string;
|
|
4756
|
+
/** The origin of the CSS to remove. Defaults to `"author"`. */
|
|
4757
|
+
cssOrigin?: CSSOrigin;
|
|
4758
|
+
/** CSS file to remove. */
|
|
4759
|
+
file?: string;
|
|
4760
|
+
/** The frame from where the CSS should be removed. Defaults to 0 (the top-level frame). */
|
|
4761
|
+
frameId?: number;
|
|
4762
|
+
/** If matchAboutBlank is true, then the code is also removed from about:blank and about:srcdoc frames if your extension has access to its parent document. By default it is `false`. */
|
|
4763
|
+
matchAboutBlank?: boolean;
|
|
4764
|
+
}
|
|
4765
|
+
|
|
4747
4766
|
/**
|
|
4748
4767
|
* The document lifecycle of the frame.
|
|
4749
4768
|
* @since Chrome 106
|
|
@@ -5167,7 +5186,7 @@ export namespace Browser {
|
|
|
5167
5186
|
requestId: number;
|
|
5168
5187
|
}
|
|
5169
5188
|
|
|
5170
|
-
/** Error codes used by providing extensions in response to requests as well as in case of errors when calling methods of the API. For success, `"OK"` must be used
|
|
5189
|
+
/** Error codes used by providing extensions in response to requests as well as in case of errors when calling methods of the API. For success, `"OK"` must be used. */
|
|
5171
5190
|
enum ProviderError {
|
|
5172
5191
|
OK = "OK",
|
|
5173
5192
|
FAILED = "FAILED",
|
|
@@ -5374,7 +5393,7 @@ export namespace Browser {
|
|
|
5374
5393
|
) => void
|
|
5375
5394
|
>;
|
|
5376
5395
|
|
|
5377
|
-
/** Raised when opening a file previously opened with `openRequestId` is requested to be closed
|
|
5396
|
+
/** Raised when opening a file previously opened with `openRequestId` is requested to be closed. */
|
|
5378
5397
|
const onCloseFileRequested: events.Event<
|
|
5379
5398
|
(
|
|
5380
5399
|
options: CloseFileRequestedOptions,
|
|
@@ -5819,7 +5838,7 @@ export namespace Browser {
|
|
|
5819
5838
|
genericFamily: `${GenericFamily}`;
|
|
5820
5839
|
/** The level of control this extension has over the setting. */
|
|
5821
5840
|
levelOfControl: `${LevelOfControl}`;
|
|
5822
|
-
/** Optional. The script code for which the font setting has changed.
|
|
5841
|
+
/** Optional. The script code for which the font setting has changed. */
|
|
5823
5842
|
script?: `${ScriptCode}`;
|
|
5824
5843
|
/** The font ID. See the description in {@link getFont}. */
|
|
5825
5844
|
fontId: string;
|
|
@@ -6278,7 +6297,8 @@ export namespace Browser {
|
|
|
6278
6297
|
/** Gets the browser UI language of the browser. This is different from {@link i18n.getAcceptLanguages} which returns the preferred user languages. */
|
|
6279
6298
|
function getUILanguage(): string;
|
|
6280
6299
|
|
|
6281
|
-
/**
|
|
6300
|
+
/**
|
|
6301
|
+
* Detects the language of the provided text using CLD.
|
|
6282
6302
|
* @param text User input string to be translated.
|
|
6283
6303
|
*
|
|
6284
6304
|
* Can return its result via Promise in Manifest V3 or later since Chrome 99.
|
|
@@ -6408,7 +6428,7 @@ export namespace Browser {
|
|
|
6408
6428
|
*
|
|
6409
6429
|
* The Identity API caches access tokens in memory, so it's ok to call getAuthToken non-interactively any time a token is required. The token cache automatically handles expiration.
|
|
6410
6430
|
*
|
|
6411
|
-
* For a good user experience it is important interactive token requests are initiated by UI in your app explaining what the authorization is for. Failing to do this will cause your users to get authorization requests, or Chrome sign in screens if they are not signed in, with
|
|
6431
|
+
* For a good user experience it is important interactive token requests are initiated by UI in your app explaining what the authorization is for. Failing to do this will cause your users to get authorization requests, or Chrome sign in screens if they are not signed in, with no context. In particular, do not use getAuthToken interactively when your app is first launched.
|
|
6412
6432
|
* @param details Token options.
|
|
6413
6433
|
*
|
|
6414
6434
|
* Can return its result via Promise since Chrome 105.
|
|
@@ -7031,13 +7051,13 @@ export namespace Browser {
|
|
|
7031
7051
|
/** This event is sent when an IME is deactivated. It signals that the IME will no longer be receiving onKeyPress events. */
|
|
7032
7052
|
const onDeactivated: events.Event<(engineID: string) => void>;
|
|
7033
7053
|
|
|
7034
|
-
/** This event is sent when the properties of the current InputContext change, such as the
|
|
7054
|
+
/** This event is sent when the properties of the current InputContext change, such as the type. It is sent to all extensions that are listening to this event, and enabled by the user. */
|
|
7035
7055
|
const onInputContextUpdate: events.Event<(context: InputContext) => void>;
|
|
7036
7056
|
|
|
7037
7057
|
/** This event is sent when an IME is activated. It signals that the IME will be receiving onKeyPress events. */
|
|
7038
7058
|
const onActivate: events.Event<(engineID: string, screen: `${ScreenType}`) => void>;
|
|
7039
7059
|
|
|
7040
|
-
|
|
7060
|
+
/** This event is sent when focus enters a text box. It is sent to all extensions that are listening to this event, and enabled by the user. */
|
|
7041
7061
|
const onFocus: events.Event<(context: InputContext) => void>;
|
|
7042
7062
|
|
|
7043
7063
|
/** Called when the user selects a menu item */
|
|
@@ -7195,7 +7215,7 @@ export namespace Browser {
|
|
|
7195
7215
|
function getSessionState(): Promise<`${SessionState}`>;
|
|
7196
7216
|
function getSessionState(callback: (sessionState: `${SessionState}`) => void): void;
|
|
7197
7217
|
|
|
7198
|
-
/** Dispatched when the session state changes. `sessionState` is the new session state
|
|
7218
|
+
/** Dispatched when the session state changes. `sessionState` is the new session state. */
|
|
7199
7219
|
const onSessionStateChanged: events.Event<(sessionState: `${SessionState}`) => void>;
|
|
7200
7220
|
}
|
|
7201
7221
|
|
|
@@ -7605,7 +7625,8 @@ export namespace Browser {
|
|
|
7605
7625
|
* **Note:** This value is required for the {@link notifications.create}() method.
|
|
7606
7626
|
*/
|
|
7607
7627
|
title?: string;
|
|
7608
|
-
/**
|
|
7628
|
+
/**
|
|
7629
|
+
* Which type of notification to display.
|
|
7609
7630
|
*
|
|
7610
7631
|
* **Note:** This value is required for the {@link notifications.create}() method.
|
|
7611
7632
|
*/
|
|
@@ -8069,7 +8090,7 @@ export namespace Browser {
|
|
|
8069
8090
|
// Platform Keys
|
|
8070
8091
|
////////////////////
|
|
8071
8092
|
/**
|
|
8072
|
-
* Use the `Browser.platformKeys` API to access client certificates managed by the platform. If the user or policy grants the permission, an extension can use such a
|
|
8093
|
+
* Use the `Browser.platformKeys` API to access client certificates managed by the platform. If the user or policy grants the permission, an extension can use such a certificate in its custom authentication protocol. E.g. this allows usage of platform managed certificates in third party VPNs (see Browser.vpnProvider).
|
|
8073
8094
|
*
|
|
8074
8095
|
* Permissions: "platformKeys"
|
|
8075
8096
|
* @platform ChromeOS only
|
|
@@ -8231,7 +8252,7 @@ export namespace Browser {
|
|
|
8231
8252
|
enum PrintError {
|
|
8232
8253
|
/** Specifies that the operation was completed successfully. */
|
|
8233
8254
|
OK = "OK",
|
|
8234
|
-
/** Specifies that a general failure
|
|
8255
|
+
/** Specifies that a general failure occurred. */
|
|
8235
8256
|
FAILED = "FAILED",
|
|
8236
8257
|
/** Specifies that the print ticket is invalid. For example, the ticket is inconsistent with some capabilities, or the extension is not able to handle all settings from the ticket. */
|
|
8237
8258
|
INVALID_TICKET = "INVALID_TICKET",
|
|
@@ -9032,7 +9053,7 @@ export namespace Browser {
|
|
|
9032
9053
|
*/
|
|
9033
9054
|
export namespace runtime {
|
|
9034
9055
|
interface LastError {
|
|
9035
|
-
/** Details about the error which occurred.
|
|
9056
|
+
/** Details about the error which occurred. */
|
|
9036
9057
|
message?: string;
|
|
9037
9058
|
}
|
|
9038
9059
|
|
|
@@ -9068,19 +9089,19 @@ export namespace Browser {
|
|
|
9068
9089
|
* @since Chrome 44
|
|
9069
9090
|
*/
|
|
9070
9091
|
enum PlatformArch {
|
|
9071
|
-
/** Specifies the
|
|
9092
|
+
/** Specifies the processor architecture as arm. */
|
|
9072
9093
|
ARM = "arm",
|
|
9073
|
-
/** Specifies the
|
|
9094
|
+
/** Specifies the processor architecture as arm64. */
|
|
9074
9095
|
ARM64 = "arm64",
|
|
9075
|
-
/** Specifies the
|
|
9096
|
+
/** Specifies the processor architecture as x86-32. */
|
|
9076
9097
|
X86_32 = "x86-32",
|
|
9077
|
-
/** Specifies the
|
|
9098
|
+
/** Specifies the processor architecture as x86-64. */
|
|
9078
9099
|
X86_64 = "x86-64",
|
|
9079
|
-
/** Specifies the
|
|
9100
|
+
/** Specifies the processor architecture as mips. */
|
|
9080
9101
|
MIPS = "mips",
|
|
9081
|
-
/** Specifies the
|
|
9102
|
+
/** Specifies the processor architecture as mips64. */
|
|
9082
9103
|
MIPS64 = "mips64",
|
|
9083
|
-
/** Specifies the
|
|
9104
|
+
/** Specifies the processor architecture as riscv64. */
|
|
9084
9105
|
RISCV64 = "riscv64",
|
|
9085
9106
|
}
|
|
9086
9107
|
|
|
@@ -9187,7 +9208,7 @@ export namespace Browser {
|
|
|
9187
9208
|
contextId: string;
|
|
9188
9209
|
/** The type of context this corresponds to. */
|
|
9189
9210
|
contextType: `${ContextType}`;
|
|
9190
|
-
/** A UUID for the document associated with this context, or undefined if this context is hosted not in a document
|
|
9211
|
+
/** A UUID for the document associated with this context, or undefined if this context is hosted not in a document. */
|
|
9191
9212
|
documentId?: string;
|
|
9192
9213
|
/** The origin of the document associated with this context, or undefined if the context is not hosted in a document. */
|
|
9193
9214
|
documentOrigin?: string;
|
|
@@ -9469,7 +9490,7 @@ export namespace Browser {
|
|
|
9469
9490
|
// Optional
|
|
9470
9491
|
/** @deprecated As of February 2024, the `author` key is no longer supported by Chrome or the Chrome Web Store. If present, it's silently ignored. */
|
|
9471
9492
|
author?: { email: string } | undefined;
|
|
9472
|
-
/** Defines overrides for selected Chrome settings.
|
|
9493
|
+
/** Defines overrides for selected Chrome settings. */
|
|
9473
9494
|
chrome_settings_overrides?: {
|
|
9474
9495
|
/** The new value for the homepage. */
|
|
9475
9496
|
homepage?: string | undefined;
|
|
@@ -9546,7 +9567,7 @@ export namespace Browser {
|
|
|
9546
9567
|
/** Files app uses above information in order to render related UI elements appropriately. For example, if `configurable` is set to true, then a menu item for configuring volumes will be rendered. Similarly, if `multiple_mounts` is set to true, then Files app will allow to add more than one mount points from the UI. If `watchable` is false, then a refresh button will be rendered. Note, that if possible you should add support for watchers, so changes on the file system can be reflected immediately and automatically. */
|
|
9547
9568
|
source: "file" | "device" | "network";
|
|
9548
9569
|
} | undefined;
|
|
9549
|
-
/**
|
|
9570
|
+
/** string specifying a URL for the extension's homepage. If this is undefined, the homepage defaults to the extension's Chrome Web Store page. This field is particularly useful if you host the extension on your own site. */
|
|
9550
9571
|
homepage_url?: string | undefined;
|
|
9551
9572
|
/** Allows resources to be imported into the extension. */
|
|
9552
9573
|
import?:
|
|
@@ -10669,9 +10690,9 @@ export namespace Browser {
|
|
|
10669
10690
|
}
|
|
10670
10691
|
|
|
10671
10692
|
interface Bounds {
|
|
10672
|
-
/**
|
|
10693
|
+
/** The x-coordinate of the upper-left corner. */
|
|
10673
10694
|
left: number;
|
|
10674
|
-
/**
|
|
10695
|
+
/** The y-coordinate of the upper-left corner. */
|
|
10675
10696
|
top: number;
|
|
10676
10697
|
/** The width of the display in pixels. */
|
|
10677
10698
|
width: number;
|
|
@@ -10901,7 +10922,8 @@ export namespace Browser {
|
|
|
10901
10922
|
dpiX: number;
|
|
10902
10923
|
/** The number of pixels per inch along the y-axis. */
|
|
10903
10924
|
dpiY: number;
|
|
10904
|
-
/**
|
|
10925
|
+
/**
|
|
10926
|
+
* The display's clockwise rotation in degrees relative to the vertical position.
|
|
10905
10927
|
* Currently exposed only on ChromeOS. Will be set to 0 on other platforms.
|
|
10906
10928
|
* A value of -1 will be interpreted as auto-rotate when the device is in a physical tablet state.
|
|
10907
10929
|
* @platform ChromeOS only
|
|
@@ -11166,7 +11188,7 @@ export namespace Browser {
|
|
|
11166
11188
|
|
|
11167
11189
|
/** @since Chrome 71 */
|
|
11168
11190
|
interface GetMediaStreamOptions {
|
|
11169
|
-
/** Optional tab id of the tab which will later invoke `getUserMedia()` to consume the stream. If not specified then the resulting stream can be used only by the calling extension. The stream can only be used by frames in the given tab whose security origin matches the
|
|
11191
|
+
/** Optional tab id of the tab which will later invoke `getUserMedia()` to consume the stream. If not specified then the resulting stream can be used only by the calling extension. The stream can only be used by frames in the given tab whose security origin matches the consumer tab's origin. The tab's origin must be a secure origin, e.g. HTTPS. */
|
|
11170
11192
|
consumerTabId?: number | undefined;
|
|
11171
11193
|
/** Optional tab id of the tab which will be captured. If not specified then the current active tab will be selected. Only tabs for which the extension has been granted the `activeTab` permission can be used as the target tab. */
|
|
11172
11194
|
targetTabId?: number | undefined;
|
|
@@ -11440,7 +11462,7 @@ export namespace Browser {
|
|
|
11440
11462
|
url?: string | undefined;
|
|
11441
11463
|
/** Adds or removes the tab from the current selection. */
|
|
11442
11464
|
highlighted?: boolean | undefined;
|
|
11443
|
-
/** Whether the tab should be active. Does not affect whether the window is focused (see {@link windows.update})
|
|
11465
|
+
/** Whether the tab should be active. Does not affect whether the window is focused (see {@link windows.update}). */
|
|
11444
11466
|
active?: boolean | undefined;
|
|
11445
11467
|
/**
|
|
11446
11468
|
* Whether the tab should be selected.
|
|
@@ -11889,7 +11911,7 @@ export namespace Browser {
|
|
|
11889
11911
|
* MV2 only
|
|
11890
11912
|
* @param tabId The ID of the tab in which to insert the CSS; defaults to the active tab of the current window.
|
|
11891
11913
|
* @param details Details of the CSS text to insert. Either the code or the file property must be set, but both may not be set at the same time.
|
|
11892
|
-
* @deprecated since Chrome
|
|
11914
|
+
* @deprecated since Chrome 91. Replaced by {@link scripting.insertCSS} in Manifest V3.
|
|
11893
11915
|
*/
|
|
11894
11916
|
function insertCSS(details: extensionTypes.InjectDetails): Promise<void>;
|
|
11895
11917
|
function insertCSS(tabId: number | undefined, details: extensionTypes.InjectDetails): Promise<void>;
|
|
@@ -11900,6 +11922,26 @@ export namespace Browser {
|
|
|
11900
11922
|
callback: () => void,
|
|
11901
11923
|
): void;
|
|
11902
11924
|
|
|
11925
|
+
/**
|
|
11926
|
+
* Removes from a page CSS that was previously injected by a call to {@link tabs.insertCSS}.
|
|
11927
|
+
*
|
|
11928
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 88.
|
|
11929
|
+
*
|
|
11930
|
+
* MV2 only
|
|
11931
|
+
* @param tabId The ID of the tab from which to remove the CSS; defaults to the active tab of the current window.
|
|
11932
|
+
* @param details Details of the CSS text to remove. Either the code or the file property must be set, but both may not be set at the same time.
|
|
11933
|
+
* @since Chrome 87
|
|
11934
|
+
* @deprecated since Chrome 91. Replaced by {@link scripting.removeCSS} in Manifest V3.
|
|
11935
|
+
*/
|
|
11936
|
+
function removeCSS(details: extensionTypes.DeleteInjectionDetails): Promise<void>;
|
|
11937
|
+
function removeCSS(tabId: number | undefined, details: extensionTypes.DeleteInjectionDetails): Promise<void>;
|
|
11938
|
+
function removeCSS(details: extensionTypes.DeleteInjectionDetails, callback: () => void): void;
|
|
11939
|
+
function removeCSS(
|
|
11940
|
+
tabId: number | undefined,
|
|
11941
|
+
details: extensionTypes.DeleteInjectionDetails,
|
|
11942
|
+
callback: () => void,
|
|
11943
|
+
): void;
|
|
11944
|
+
|
|
11903
11945
|
/**
|
|
11904
11946
|
* Highlights the given tabs and focuses on the first of group. Will appear to do nothing if the specified tab is currently active.
|
|
11905
11947
|
*
|
|
@@ -11977,7 +12019,7 @@ export namespace Browser {
|
|
|
11977
12019
|
* Discards a tab from memory. Discarded tabs are still visible on the tab strip and are reloaded when activated.
|
|
11978
12020
|
*
|
|
11979
12021
|
* Can return its result via Promise in Manifest V3 or later since Chrome 88.
|
|
11980
|
-
* @param tabId The ID of the tab to be discarded. If specified, the tab is discarded unless it is active or already discarded. If omitted, the browser discards the least important tab. This can fail if no discardable tabs exist
|
|
12022
|
+
* @param tabId The ID of the tab to be discarded. If specified, the tab is discarded unless it is active or already discarded. If omitted, the browser discards the least important tab. This can fail if no discardable tabs exist.
|
|
11981
12023
|
* @since Chrome 54
|
|
11982
12024
|
*/
|
|
11983
12025
|
function discard(tabId?: number): Promise<Tab | undefined>;
|
|
@@ -12352,7 +12394,7 @@ export namespace Browser {
|
|
|
12352
12394
|
voiceName?: string;
|
|
12353
12395
|
}
|
|
12354
12396
|
|
|
12355
|
-
/** @deprecated since Chrome 70. Gender is deprecated and is ignored
|
|
12397
|
+
/** @deprecated since Chrome 70. Gender is deprecated and is ignored. */
|
|
12356
12398
|
enum VoiceGender {
|
|
12357
12399
|
FEMALE = "female",
|
|
12358
12400
|
MALE = "male",
|
|
@@ -12819,7 +12861,7 @@ export namespace Browser {
|
|
|
12819
12861
|
/** Triggered when a configuration created by the extension is removed by the platform. */
|
|
12820
12862
|
const onConfigRemoved: events.Event<(id: string) => void>;
|
|
12821
12863
|
|
|
12822
|
-
|
|
12864
|
+
/** Triggered when a configuration is created by the platform for the extension. */
|
|
12823
12865
|
const onConfigCreated: events.Event<
|
|
12824
12866
|
(id: string, name: string, data: { [key: string]: unknown }) => void
|
|
12825
12867
|
>;
|
|
@@ -12905,7 +12947,7 @@ export namespace Browser {
|
|
|
12905
12947
|
interface GetRequest {
|
|
12906
12948
|
/** The `PublicKeyCredentialRequestOptions` passed to `navigator.credentials.get()`, serialized as a JSON string. The serialization format is compatible with [`PublicKeyCredential.parseRequestOptionsFromJSON()`](https://w3c.github.io/webauthn/#sctn-parseRequestOptionsFromJSON). */
|
|
12907
12949
|
requestDetailsJson: string;
|
|
12908
|
-
/**
|
|
12950
|
+
/** An opaque identifier for the request. */
|
|
12909
12951
|
requestId: number;
|
|
12910
12952
|
}
|
|
12911
12953
|
|
|
@@ -12937,7 +12979,7 @@ export namespace Browser {
|
|
|
12937
12979
|
*
|
|
12938
12980
|
* The attached extension must call `detach()` once the remote desktop session has ended in order to resume regular WebAuthn request processing. Extensions automatically become detached if they are unloaded.
|
|
12939
12981
|
*
|
|
12940
|
-
* Refer to the `onRemoteSessionStateChange` event for signaling a change of remote session attachment from a native application to
|
|
12982
|
+
* Refer to the `onRemoteSessionStateChange` event for signaling a change of remote session attachment from a native application to the (possibly suspended) extension.
|
|
12941
12983
|
*/
|
|
12942
12984
|
function attach(): Promise<string | undefined>;
|
|
12943
12985
|
function attach(callback: (error?: string | undefined) => void): void;
|
|
@@ -12959,7 +13001,7 @@ export namespace Browser {
|
|
|
12959
13001
|
*
|
|
12960
13002
|
* This method is typically called when the extension detects that a remote desktop session was terminated. Once this method returns, the extension ceases to be the active Web Authentication API request proxy.
|
|
12961
13003
|
*
|
|
12962
|
-
* Refer to the `onRemoteSessionStateChange` event for signaling a change of remote session attachment from a native application to
|
|
13004
|
+
* Refer to the `onRemoteSessionStateChange` event for signaling a change of remote session attachment from a native application to the (possibly suspended) extension.
|
|
12963
13005
|
*/
|
|
12964
13006
|
function detach(): Promise<string | undefined>;
|
|
12965
13007
|
function detach(callback: (error?: string | undefined) => void): void;
|
|
@@ -13056,7 +13098,7 @@ export namespace Browser {
|
|
|
13056
13098
|
);
|
|
13057
13099
|
|
|
13058
13100
|
interface GetFrameResultDetails {
|
|
13059
|
-
/** The URL currently associated with this frame, if the frame identified by the frameId existed at one point in the given tab. The fact that
|
|
13101
|
+
/** The URL currently associated with this frame, if the frame identified by the frameId existed at one point in the given tab. The fact that a URL is associated with a given frameId does not imply that the corresponding frame still exists. */
|
|
13060
13102
|
url: string;
|
|
13061
13103
|
/** A UUID of the document loaded. */
|
|
13062
13104
|
documentId: string;
|
|
@@ -13161,7 +13203,7 @@ export namespace Browser {
|
|
|
13161
13203
|
documentId: string;
|
|
13162
13204
|
/** Cause of the navigation. */
|
|
13163
13205
|
transitionType: `${TransitionType}`;
|
|
13164
|
-
/** A list of transition qualifiers
|
|
13206
|
+
/** A list of transition qualifiers. */
|
|
13165
13207
|
transitionQualifiers: `${TransitionQualifier}`[];
|
|
13166
13208
|
}
|
|
13167
13209
|
|
|
@@ -13212,7 +13254,7 @@ export namespace Browser {
|
|
|
13212
13254
|
/** Fired when a document, including the resources it refers to, is completely loaded and initialized. */
|
|
13213
13255
|
const onCompleted: WebNavigationEvent<(details: WebNavigationFramedCallbackDetails) => void>;
|
|
13214
13256
|
|
|
13215
|
-
|
|
13257
|
+
/** Fired when the frame's history was updated to a new URL. All future events for that frame will use the updated URL. */
|
|
13216
13258
|
const onHistoryStateUpdated: WebNavigationEvent<
|
|
13217
13259
|
(details: WebNavigationTransitionCallbackDetails) => void
|
|
13218
13260
|
>;
|
|
@@ -13222,7 +13264,7 @@ export namespace Browser {
|
|
|
13222
13264
|
(details: WebNavigationSourceCallbackDetails) => void
|
|
13223
13265
|
>;
|
|
13224
13266
|
|
|
13225
|
-
/** Fired when the contents of the tab is replaced by a different (usually previously pre-rendered) tab*/
|
|
13267
|
+
/** Fired when the contents of the tab is replaced by a different (usually previously pre-rendered) tab */
|
|
13226
13268
|
const onTabReplaced: events.Event<(details: WebNavigationReplacementCallbackDetails) => void>;
|
|
13227
13269
|
|
|
13228
13270
|
/** Fired when a navigation is about to occur. */
|
|
@@ -13515,7 +13557,7 @@ export namespace Browser {
|
|
|
13515
13557
|
* @since Chrome 43
|
|
13516
13558
|
*/
|
|
13517
13559
|
statusCode: number;
|
|
13518
|
-
/** HTTP status line of the response or the 'HTTP/0.9 200 OK' string for HTTP/0.9 responses (i.e., responses that lack a status line) or an empty string if there are no headers
|
|
13560
|
+
/** HTTP status line of the response or the 'HTTP/0.9 200 OK' string for HTTP/0.9 responses (i.e., responses that lack a status line) or an empty string if there are no headers. */
|
|
13519
13561
|
statusLine: string;
|
|
13520
13562
|
}
|
|
13521
13563
|
|
|
@@ -13530,7 +13572,7 @@ export namespace Browser {
|
|
|
13530
13572
|
responseHeaders?: HttpHeader[];
|
|
13531
13573
|
/** Standard HTTP status code returned by the server. */
|
|
13532
13574
|
statusCode: number;
|
|
13533
|
-
/** HTTP status line of the response or the 'HTTP/0.9 200 OK' string for HTTP/0.9 responses (i.e., responses that lack a status line) or an empty string if there are no headers
|
|
13575
|
+
/** HTTP status line of the response or the 'HTTP/0.9 200 OK' string for HTTP/0.9 responses (i.e., responses that lack a status line) or an empty string if there are no headers. */
|
|
13534
13576
|
statusLine: string;
|
|
13535
13577
|
}
|
|
13536
13578
|
|
|
@@ -13562,7 +13604,7 @@ export namespace Browser {
|
|
|
13562
13604
|
responseHeaders?: HttpHeader[];
|
|
13563
13605
|
/** Standard HTTP status code returned by the server. */
|
|
13564
13606
|
statusCode: number;
|
|
13565
|
-
/** HTTP status line of the response or the 'HTTP/0.9 200 OK' string for HTTP/0.9 responses (i.e., responses that lack a status line) or an empty string if there are no headers
|
|
13607
|
+
/** HTTP status line of the response or the 'HTTP/0.9 200 OK' string for HTTP/0.9 responses (i.e., responses that lack a status line) or an empty string if there are no headers. */
|
|
13566
13608
|
statusLine: string;
|
|
13567
13609
|
}
|
|
13568
13610
|
|
|
@@ -13585,7 +13627,7 @@ export namespace Browser {
|
|
|
13585
13627
|
securityInfo?: SecurityInfo;
|
|
13586
13628
|
/** Standard HTTP status code returned by the server. */
|
|
13587
13629
|
statusCode: number;
|
|
13588
|
-
/** HTTP status line of the response or the 'HTTP/0.9 200 OK' string for HTTP/0.9 responses (i.e., responses that lack a status line) or an empty string if there are no headers
|
|
13630
|
+
/** HTTP status line of the response or the 'HTTP/0.9 200 OK' string for HTTP/0.9 responses (i.e., responses that lack a status line) or an empty string if there are no headers. */
|
|
13589
13631
|
statusLine: string;
|
|
13590
13632
|
}
|
|
13591
13633
|
|
|
@@ -13616,9 +13658,9 @@ export namespace Browser {
|
|
|
13616
13658
|
|
|
13617
13659
|
const onActionIgnored: events.Event<
|
|
13618
13660
|
(details: {
|
|
13619
|
-
|
|
13661
|
+
/** The proposed action which was ignored. */
|
|
13620
13662
|
action: `${IgnoredActionType}`;
|
|
13621
|
-
|
|
13663
|
+
/** The ID of the request. Request IDs are unique within a browser session. As a result, they could be used to relate different events of the same request. */
|
|
13622
13664
|
requestId: string;
|
|
13623
13665
|
}) => void
|
|
13624
13666
|
>;
|
|
@@ -13663,7 +13705,6 @@ export namespace Browser {
|
|
|
13663
13705
|
) => BlockingResponse | undefined,
|
|
13664
13706
|
`${OnAuthRequiredOptions}`[]
|
|
13665
13707
|
>;
|
|
13666
|
-
// const onAuthRequired: WebAuthenticationChallengeEvent;
|
|
13667
13708
|
|
|
13668
13709
|
/** Fired when the first byte of the response body is received. For HTTP requests, this means that the status line and response headers are available. */
|
|
13669
13710
|
const onResponseStarted: WebRequestEvent<
|
|
@@ -14769,13 +14810,13 @@ export namespace Browser {
|
|
|
14769
14810
|
/** @since Chrome 141 */
|
|
14770
14811
|
type CloseOptions =
|
|
14771
14812
|
| {
|
|
14772
|
-
/** The tab in which to close the side panel. If a tab-specific side panel is open in the specified tab, it will be closed for that tab. At least one of this or `windowId` must be provided.
|
|
14813
|
+
/** The tab in which to close the side panel. If a tab-specific side panel is open in the specified tab, it will be closed for that tab. At least one of this or `windowId` must be provided. */
|
|
14773
14814
|
tabId: number;
|
|
14774
14815
|
/** The window in which to close the side panel. If a global side panel is open in the specified window, it will be closed for all tabs in that window where no tab-specific panel is active. At least one of this or `tabId` must be provided. */
|
|
14775
14816
|
windowId?: number | undefined;
|
|
14776
14817
|
}
|
|
14777
14818
|
| {
|
|
14778
|
-
/** The tab in which to close the side panel. If a tab-specific side panel is open in the specified tab, it will be closed for that tab. At least one of this or `windowId` must be provided.
|
|
14819
|
+
/** The tab in which to close the side panel. If a tab-specific side panel is open in the specified tab, it will be closed for that tab. At least one of this or `windowId` must be provided. */
|
|
14779
14820
|
tabId?: number | undefined;
|
|
14780
14821
|
/** The window in which to close the side panel. If a global side panel is open in the specified window, it will be closed for all tabs in that window where no tab-specific panel is active. At least one of this or `tabId` must be provided. */
|
|
14781
14822
|
windowId: number;
|
|
@@ -14795,7 +14836,7 @@ export namespace Browser {
|
|
|
14795
14836
|
/**
|
|
14796
14837
|
* The tab in which to open the side panel.
|
|
14797
14838
|
* If the corresponding tab has a tab-specific side panel, the panel will only be open for that tab.
|
|
14798
|
-
* If there is not a tab-specific panel, the global panel will be open in the specified tab and any other tabs without a currently-open tab-
|
|
14839
|
+
* If there is not a tab-specific panel, the global panel will be open in the specified tab and any other tabs without a currently-open tab-specific panel.
|
|
14799
14840
|
* This will override any currently-active side panel (global or tab-specific) in the corresponding tab.
|
|
14800
14841
|
* At least one of this and `windowId` must be provided. */
|
|
14801
14842
|
tabId?: number | undefined;
|
|
@@ -14987,7 +15028,7 @@ export namespace Browser {
|
|
|
14987
15028
|
interface WorldProperties {
|
|
14988
15029
|
/** Specifies the world csp. The default is the `ISOLATED` world csp. */
|
|
14989
15030
|
csp?: string | undefined;
|
|
14990
|
-
/** Specifies whether messaging APIs are exposed. The default is `false
|
|
15031
|
+
/** Specifies whether messaging APIs are exposed. The default is `false`. */
|
|
14991
15032
|
messaging?: boolean | undefined;
|
|
14992
15033
|
/**
|
|
14993
15034
|
* Specifies the ID of the specific user script world to update. If not provided, updates the properties of the default user script world. Values with leading underscores (`_`) are reserved.
|
|
@@ -15001,7 +15042,7 @@ export namespace Browser {
|
|
|
15001
15042
|
ids?: string[] | undefined;
|
|
15002
15043
|
}
|
|
15003
15044
|
|
|
15004
|
-
|
|
15045
|
+
/** @since Chrome 135 */
|
|
15005
15046
|
type InjectionTarget =
|
|
15006
15047
|
& {
|
|
15007
15048
|
/** The ID of the tab into which to inject. */
|
|
@@ -15039,13 +15080,13 @@ export namespace Browser {
|
|
|
15039
15080
|
allFrames?: boolean | undefined;
|
|
15040
15081
|
/** Specifies wildcard patterns for pages this user script will NOT be injected into. */
|
|
15041
15082
|
excludeGlobs?: string[] | undefined;
|
|
15042
|
-
/**Excludes pages that this user script would otherwise be injected into. See Match Patterns for more details on the syntax of these strings. */
|
|
15083
|
+
/** Excludes pages that this user script would otherwise be injected into. See Match Patterns for more details on the syntax of these strings. */
|
|
15043
15084
|
excludeMatches?: string[] | undefined;
|
|
15044
15085
|
/** The ID of the user script specified in the API call. This property must not start with a '_' as it's reserved as a prefix for generated script IDs. */
|
|
15045
15086
|
id: string;
|
|
15046
15087
|
/** Specifies wildcard patterns for pages this user script will be injected into. */
|
|
15047
15088
|
includeGlobs?: string[] | undefined;
|
|
15048
|
-
/** The list of ScriptSource objects defining sources of scripts to be injected into matching pages. This property must be specified for {@link register}, and when specified it must be a non-empty array
|
|
15089
|
+
/** The list of ScriptSource objects defining sources of scripts to be injected into matching pages. This property must be specified for {@link register}, and when specified it must be a non-empty array. */
|
|
15049
15090
|
js?: ScriptSource[] | undefined;
|
|
15050
15091
|
/** Specifies which pages this user script will be injected into. See Match Patterns for more details on the syntax of these strings. This property must be specified for {@link register}. */
|
|
15051
15092
|
matches?: string[] | undefined;
|