Namespace: Background

Background

The background script for the extension.

Source:

Methods


<private, static> _onChromeMessage(request [, sender] [, response]) → {boolean}

Event: Fired when a message is sent from either an extension process
(by runtime.sendMessage) or a content script (by tabs.sendMessage).

Parameters:
Name Type Argument Description
request Chrome.Msg.Message

details for the message

sender Object <optional>

MessageSender object

response function <optional>

function to call once after processing

Source:
See:
Returns:

true if asynchronous

Type
boolean

<private, static> _onIconClicked()

Event: Fired when a browser action icon is clicked.

Source:
See:

<private, static> _onInstalled(details)

Event: Fired when the extension is first installed,
when the extension is updated to a new version,
and when Chrome is updated to a new version.

Parameters:
Name Type Description
details Object

type of event

Properties
Name Type Description
reason string

reason for install

previousVersion string

old version if 'update' reason

Source:
See:

<private, static> _onLoad()

Event: called when document and resources are loaded

Source:

<private, static> _onLoad()

Event: called when document and resources are loaded

Source:

<private, static> _onStartup()

Event: Fired when a profile that has this extension installed first starts up

Source:
See:

<private, static> _onStorageChanged(event)

Event: Fired when item in localStorage changes

Parameters:
Name Type Description
event Event

StorageEvent

Properties
Name Type Description
key string

storage item that changed

Source:
See:

<private, static> _showOptionsTab()

Display the options tab

Source: