From 16206c78d0ec1df968484e57128c6f0d70956164 Mon Sep 17 00:00:00 2001 From: Mat Carlson Date: Fri, 11 Jan 2019 09:13:16 -0800 Subject: [PATCH] Add missing properties to chrome.ContextMenu Add `frameId` to OnClickData; add `visible` to CreateProperties. Both are described here: https://developer.chrome.com/extensions/contextMenus#method-create --- types/chrome/index.d.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/types/chrome/index.d.ts b/types/chrome/index.d.ts index 06daa9b62d..528ab91be7 100644 --- a/types/chrome/index.d.ts +++ b/types/chrome/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for Chrome extension development // Project: http://developer.chrome.com/extensions/ -// Definitions by: Matthew Kimber , otiai10 , couven92 , RReverser , sreimer15 +// Definitions by: Matthew Kimber , otiai10 , couven92 , RReverser , sreimer15 , MatCarlson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.4 @@ -1095,6 +1095,13 @@ declare namespace chrome.contextMenus { * The ID of the menu item that was clicked. */ menuItemId: any; + /** + * Optional. + * Since Chrome 35. + * The ID of the frame of the element where the context menu was + * clicked, if it was in a frame. + */ + frameId?: number; /** * Optional. * Since Chrome 35. @@ -1177,6 +1184,12 @@ declare namespace chrome.contextMenus { * The unique ID to assign to this item. Mandatory for event pages. Cannot be the same as another ID for this extension. */ id?: string; + /** + * Optional. + * Since Chrome 62. + * Whether the item is visible in the menu. + */ + visible?: boolean; } export interface UpdateProperties {