Options
All
  • Public
  • Public/Protected
  • All
Menu

External module chrome/msg

Index

Interfaces

Type aliases

Variables

Functions

Object literals

Type aliases

Listener

Listener: function

Method signature for listener

Type declaration

ResponseCB

ResponseCB: function

Method signature for response callback

Type declaration

    • (jsonifiable: any): void
    • Parameters

      • jsonifiable: any

      Returns void

Variables

Const chromep

chromep: ChromePromise = new ChromePromise()

Functions

addListener

  • Add a listener for chrome messages

    Parameters

    • listener: Listener

      function to receive messages

    Returns void

removeListener

  • removeListener(listener: Listener): void
  • Remove a listener for chrome messages

    Parameters

    • listener: Listener

      function to receive messages

    Returns void

send

  • Send a chrome message

    throws

    An error if we failed to connect to the extension

    Parameters

    Returns Promise<any>

    Something that is json

Object literals

Const TYPE

TYPE: object

Chrome Messages

HIGHLIGHT

HIGHLIGHT: IMsgType = {message: 'highlightTab',} as IMsgType

highlight the options tab

RESTORE_DEFAULTS

RESTORE_DEFAULTS: IMsgType = {message: 'restoreDefaults',} as IMsgType

restore default settings for app

STORAGE_EXCEEDED

STORAGE_EXCEEDED: IMsgType = {message: 'storageExceeded',} as IMsgType

save to some storage source failed because it would exceed capacity

STORE

STORE: IMsgType = {message: 'store',key: '',value: '',} as IMsgType

save value to local storage

Generated using TypeDoc