@types/chrome 0.0.169 → 0.0.170
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.
- chrome/README.md +1 -1
- chrome/index.d.ts +9 -5
- 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:
|
11
|
+
* Last updated: Sun, 12 Dec 2021 06:31:08 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
@@ -1516,7 +1516,7 @@ declare namespace chrome.contextMenus {
|
|
1516
1516
|
* Since Chrome 35.
|
1517
1517
|
* One of 'image', 'video', or 'audio' if the context menu was activated on one of these types of elements.
|
1518
1518
|
*/
|
1519
|
-
mediaType?:
|
1519
|
+
mediaType?: 'image' | 'video' | 'audio' | undefined;
|
1520
1520
|
/**
|
1521
1521
|
* Optional.
|
1522
1522
|
* Since Chrome 35.
|
@@ -1548,6 +1548,10 @@ declare namespace chrome.contextMenus {
|
|
1548
1548
|
srcUrl?: string | undefined;
|
1549
1549
|
}
|
1550
1550
|
|
1551
|
+
type ContextType = "all" | "page" | "frame" | "selection" | "link" | "editable" | "image" | "video" | "audio" | "launcher" | "browser_action" | "page_action" | "action";
|
1552
|
+
|
1553
|
+
type ContextItemType = "normal" | "checkbox" | "radio" | "separator";
|
1554
|
+
|
1551
1555
|
export interface CreateProperties {
|
1552
1556
|
/** Optional. Lets you restrict the item to apply only to documents whose URL matches one of the given patterns. (This applies to frames as well.) For details on the format of a pattern, see Match Patterns. */
|
1553
1557
|
documentUrlPatterns?: string[] | undefined;
|
@@ -1556,7 +1560,7 @@ declare namespace chrome.contextMenus {
|
|
1556
1560
|
/** Optional. The text to be displayed in the item; this is required unless type is 'separator'. When the context is 'selection', you can 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". */
|
1557
1561
|
title?: string | undefined;
|
1558
1562
|
/** Optional. List of contexts this menu item will appear in. Defaults to ['page'] if not specified. */
|
1559
|
-
contexts?:
|
1563
|
+
contexts?: ContextType | ContextType[] | undefined;
|
1560
1564
|
/**
|
1561
1565
|
* Optional.
|
1562
1566
|
* Since Chrome 20.
|
@@ -1575,7 +1579,7 @@ declare namespace chrome.contextMenus {
|
|
1575
1579
|
/** Optional. The ID of a parent menu item; this makes the item a child of a previously added item. */
|
1576
1580
|
parentId?: any;
|
1577
1581
|
/** Optional. The type of menu item. Defaults to 'normal' if not specified. */
|
1578
|
-
type?:
|
1582
|
+
type?: ContextItemType | undefined;
|
1579
1583
|
/**
|
1580
1584
|
* Optional.
|
1581
1585
|
* Since Chrome 21.
|
@@ -1594,14 +1598,14 @@ declare namespace chrome.contextMenus {
|
|
1594
1598
|
documentUrlPatterns?: string[] | undefined;
|
1595
1599
|
checked?: boolean | undefined;
|
1596
1600
|
title?: string | undefined;
|
1597
|
-
contexts?:
|
1601
|
+
contexts?: ContextType[] | undefined;
|
1598
1602
|
/** Optional. Since Chrome 20. */
|
1599
1603
|
enabled?: boolean | undefined;
|
1600
1604
|
targetUrlPatterns?: string[] | undefined;
|
1601
1605
|
onclick?: Function | undefined;
|
1602
1606
|
/** Optional. Note: You cannot change an item to be a child of one of its own descendants. */
|
1603
1607
|
parentId?: number | string;
|
1604
|
-
type?:
|
1608
|
+
type?: ContextItemType | undefined;
|
1605
1609
|
/**
|
1606
1610
|
* Optional.
|
1607
1611
|
* @since Chrome 62.
|
chrome/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/chrome",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.170",
|
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",
|
@@ -103,6 +103,6 @@
|
|
103
103
|
"@types/filesystem": "*",
|
104
104
|
"@types/har-format": "*"
|
105
105
|
},
|
106
|
-
"typesPublisherContentHash": "
|
106
|
+
"typesPublisherContentHash": "7b8a3b7326117b80093beaf50ba7c6f0b7dc907c6c86559c665d9a422daa47ac",
|
107
107
|
"typeScriptVersion": "3.8"
|
108
108
|
}
|