Global

This namespace contains methods and types related to the UI Elements that are available Globally in Gmail.

Namespace methods#

addSidebarContentPanel(contentPanelDescriptor)#

Adds an icon in the "global app" icon area on the right side of Gmail. When the user clicks the icon the global sidebar will be open with the el displayed.

ParametersTypeDescription
contentPanelDescriptorContentPanelDescriptorThe details of the content panel to add to the global sidebar.

Returns a Promise<ContentPanelView>

addSupportItem(supportItemDescriptor)#

Adds a support item right in the Gmail support menu.

ParametersTypeDescription
supportItemDescriptorSupportItemDescriptorThe details of the support item to be added to the Gmail support menu.

Returns a SupportItemView


SupportItemView#

Object that represents a Gmail support item in the support menu. This class is returned by Global.addSupportItem().

Methods#

destroy()#

Remove the support view item from support menu


SupportItemDescriptor#

This type is accepted by the Global.addSupportItem() method to insert a SupportItemView for a Gmail support item. A support item view allows you adding an element that is used for displaying and a callback function to call when the user clicks on the item. Support item view also supports arrow key up/down navigation same as other Gmail support items in the menu and on Enter key press down it fires the onClick call back.

PropertyTypeDescriptionRequired?Default
elementHTMLElementThe actual HTMLElement of the support item.Yes
onClickfunction(event)The callback when the item is clicked.Yes