@types/chrome 0.0.226 → 0.0.228
Sign up to get free protection for your applications and to get access to all the features.
- chrome/README.md +1 -1
- chrome/index.d.ts +35 -2
- chrome/package.json +2 -2
chrome/README.md
CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for Chrome extension development (http://
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome.
|
9
9
|
|
10
10
|
### Additional Details
|
11
|
-
* Last updated: Mon,
|
11
|
+
* Last updated: Mon, 03 Apr 2023 18:33:22 GMT
|
12
12
|
* Dependencies: [@types/filesystem](https://npmjs.com/package/@types/filesystem), [@types/har-format](https://npmjs.com/package/@types/har-format)
|
13
13
|
* Global values: `chrome`
|
14
14
|
|
chrome/index.d.ts
CHANGED
@@ -367,13 +367,30 @@ declare namespace chrome.alarms {
|
|
367
367
|
|
368
368
|
export interface AlarmEvent extends chrome.events.Event<(alarm: Alarm) => void> { }
|
369
369
|
|
370
|
+
/**
|
371
|
+
* Creates an alarm. Near the time(s) specified by alarmInfo, the onAlarm event is fired. If there is another alarm with the same name (or no name if none is specified), it will be cancelled and replaced by this alarm.
|
372
|
+
* In order to reduce the load on the user's machine, Chrome limits alarms to at most once every 1 minute but may delay them an arbitrary amount more. That is, setting delayInMinutes or periodInMinutes to less than 1 will not be honored and will cause a warning. when can be set to less than 1 minute after "now" without warning but won't actually cause the alarm to fire for at least 1 minute.
|
373
|
+
* To help you debug your app or extension, when you've loaded it unpacked, there's no limit to how often the alarm can fire.
|
374
|
+
* @param alarmInfo Describes when the alarm should fire. The initial time must be specified by either when or delayInMinutes (but not both). If periodInMinutes is set, the alarm will repeat every periodInMinutes minutes after the initial event. If neither when or delayInMinutes is set for a repeating alarm, periodInMinutes is used as the default for delayInMinutes.
|
375
|
+
* @return The `create` method provides its result via callback or returned as a `Promise` (MV3 only).
|
376
|
+
*/
|
377
|
+
export function create(alarmInfo: AlarmCreateInfo): Promise<void>;
|
378
|
+
/**
|
379
|
+
* Creates an alarm. Near the time(s) specified by alarmInfo, the onAlarm event is fired. If there is another alarm with the same name (or no name if none is specified), it will be cancelled and replaced by this alarm.
|
380
|
+
* In order to reduce the load on the user's machine, Chrome limits alarms to at most once every 1 minute but may delay them an arbitrary amount more. That is, setting delayInMinutes or periodInMinutes to less than 1 will not be honored and will cause a warning. when can be set to less than 1 minute after "now" without warning but won't actually cause the alarm to fire for at least 1 minute.
|
381
|
+
* To help you debug your app or extension, when you've loaded it unpacked, there's no limit to how often the alarm can fire.
|
382
|
+
* @param name Optional name to identify this alarm. Defaults to the empty string.
|
383
|
+
* @param alarmInfo Describes when the alarm should fire. The initial time must be specified by either when or delayInMinutes (but not both). If periodInMinutes is set, the alarm will repeat every periodInMinutes minutes after the initial event. If neither when or delayInMinutes is set for a repeating alarm, periodInMinutes is used as the default for delayInMinutes.
|
384
|
+
* @return The `create` method provides its result via callback or returned as a `Promise` (MV3 only).
|
385
|
+
*/
|
386
|
+
export function create(name: string, alarmInfo: AlarmCreateInfo): Promise<void>;
|
370
387
|
/**
|
371
388
|
* Creates an alarm. Near the time(s) specified by alarmInfo, the onAlarm event is fired. If there is another alarm with the same name (or no name if none is specified), it will be cancelled and replaced by this alarm.
|
372
389
|
* In order to reduce the load on the user's machine, Chrome limits alarms to at most once every 1 minute but may delay them an arbitrary amount more. That is, setting delayInMinutes or periodInMinutes to less than 1 will not be honored and will cause a warning. when can be set to less than 1 minute after "now" without warning but won't actually cause the alarm to fire for at least 1 minute.
|
373
390
|
* To help you debug your app or extension, when you've loaded it unpacked, there's no limit to how often the alarm can fire.
|
374
391
|
* @param alarmInfo Describes when the alarm should fire. The initial time must be specified by either when or delayInMinutes (but not both). If periodInMinutes is set, the alarm will repeat every periodInMinutes minutes after the initial event. If neither when or delayInMinutes is set for a repeating alarm, periodInMinutes is used as the default for delayInMinutes.
|
375
392
|
*/
|
376
|
-
export function create(alarmInfo: AlarmCreateInfo): void;
|
393
|
+
export function create(alarmInfo: AlarmCreateInfo, callback: () => void): void;
|
377
394
|
/**
|
378
395
|
* Creates an alarm. Near the time(s) specified by alarmInfo, the onAlarm event is fired. If there is another alarm with the same name (or no name if none is specified), it will be cancelled and replaced by this alarm.
|
379
396
|
* In order to reduce the load on the user's machine, Chrome limits alarms to at most once every 1 minute but may delay them an arbitrary amount more. That is, setting delayInMinutes or periodInMinutes to less than 1 will not be honored and will cause a warning. when can be set to less than 1 minute after "now" without warning but won't actually cause the alarm to fire for at least 1 minute.
|
@@ -381,7 +398,7 @@ declare namespace chrome.alarms {
|
|
381
398
|
* @param name Optional name to identify this alarm. Defaults to the empty string.
|
382
399
|
* @param alarmInfo Describes when the alarm should fire. The initial time must be specified by either when or delayInMinutes (but not both). If periodInMinutes is set, the alarm will repeat every periodInMinutes minutes after the initial event. If neither when or delayInMinutes is set for a repeating alarm, periodInMinutes is used as the default for delayInMinutes.
|
383
400
|
*/
|
384
|
-
export function create(name: string, alarmInfo: AlarmCreateInfo): void;
|
401
|
+
export function create(name: string, alarmInfo: AlarmCreateInfo, callback: () => void): void;
|
385
402
|
/**
|
386
403
|
* Gets an array of all the alarms.
|
387
404
|
*/
|
@@ -10529,8 +10546,16 @@ declare namespace chrome.webNavigation {
|
|
10529
10546
|
export interface GetFrameResultDetails {
|
10530
10547
|
/** 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 an URL is associated with a given frameId does not imply that the corresponding frame still exists. */
|
10531
10548
|
url: string;
|
10549
|
+
/** A UUID of the document loaded. */
|
10550
|
+
documentId: string;
|
10551
|
+
/** The lifecycle the document is in. */
|
10552
|
+
documentLifecycle: "prerender" | "active" | "cached" | "pending_deletion";
|
10532
10553
|
/** True if the last navigation in this frame was interrupted by an error, i.e. the onErrorOccurred event fired. */
|
10533
10554
|
errorOccurred: boolean;
|
10555
|
+
/** The type of frame the navigation occurred in. */
|
10556
|
+
frameType: "outermost_frame" | "fenced_frame" | "sub_frame";
|
10557
|
+
/** A UUID of the parent document owning this frame. This is not set if there is no parent. */
|
10558
|
+
parentDocumentId?: string | undefined;
|
10534
10559
|
/** ID of frame that wraps the frame. Set to -1 of no parent frame exists. */
|
10535
10560
|
parentFrameId: number;
|
10536
10561
|
}
|
@@ -10566,6 +10591,14 @@ declare namespace chrome.webNavigation {
|
|
10566
10591
|
export interface WebNavigationFramedCallbackDetails extends WebNavigationUrlCallbackDetails {
|
10567
10592
|
/** 0 indicates the navigation happens in the tab content window; a positive value indicates navigation in a subframe. Frame IDs are unique for a given tab and process. */
|
10568
10593
|
frameId: number;
|
10594
|
+
/** The type of frame the navigation occurred in. */
|
10595
|
+
frameType: "outermost_frame" | "fenced_frame" | "sub_frame";
|
10596
|
+
/** A UUID of the document loaded. (This is not set for onBeforeNavigate callbacks.) */
|
10597
|
+
documentId?: string | undefined;
|
10598
|
+
/** The lifecycle the document is in. */
|
10599
|
+
documentLifecycle: "prerender" | "active" | "cached" | "pending_deletion";
|
10600
|
+
/** A UUID of the parent document owning this frame. This is not set if there is no parent. */
|
10601
|
+
parentDocumentId?: string | undefined;
|
10569
10602
|
/**
|
10570
10603
|
* The ID of the process runs the renderer for this tab.
|
10571
10604
|
* @since Chrome 22.
|
chrome/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/chrome",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.228",
|
4
4
|
"description": "TypeScript definitions for Chrome extension development",
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome",
|
6
6
|
"license": "MIT",
|
@@ -93,6 +93,6 @@
|
|
93
93
|
"@types/filesystem": "*",
|
94
94
|
"@types/har-format": "*"
|
95
95
|
},
|
96
|
-
"typesPublisherContentHash": "
|
96
|
+
"typesPublisherContentHash": "8b74a4d0a766094ef68e1c62ce3972f2098b491a029a4c41b04a3e1f7f53b5d9",
|
97
97
|
"typeScriptVersion": "4.3"
|
98
98
|
}
|