Module runtime

Index

Variables

Interfaces

Functions

Variables

id: string

lastError: Object

onConnect: ExtensionConnectEvent

onConnectExternal: ExtensionConnectExternalEvent

onInstalled: RuntimeInstalledEvent

onMessage: RuntimeMessageEvent

onMessageExternal: RuntimeMessageEvent

onRestartRequired: RuntimeRestartRequiredEvent

onStartup: RuntimeStartupEvent

onSuspend: RuntimeSuspendEvent

onSuspendCanceled: RuntimeSuspendCanceledEvent

onUpdateAvailable: RuntimeUpdateAvailableEvent

Functions

connect(connectInfo?: ConnectInfo): Port

Parameters

Returns

Port

connect(extensionId: string, connectInfo?: ConnectInfo): Port

Parameters

  • extensionId: string
  • connectInfo?: ConnectInfo optional

Returns

Port

connectNative(application: string): Port

Parameters

  • application: string

Returns

Port

getBackgroundPage(callback: (backgroundPage?: Window) => void)

Parameters

  • callback: (backgroundPage?: Window) => void

getManifest(): Object

Returns

Object

getPackageDirectoryEntry(callback: (directoryEntry: any) => void)

Parameters

  • callback: (directoryEntry: any) => void

getPlatformInfo(callback: (platformInfo: chrome.runtime.PlatformInfo) => void)

Parameters

  • callback: (platformInfo: chrome.runtime.PlatformInfo) => void

getURL(path: string): string

Parameters

  • path: string

Returns

string

reload()

requestUpdateCheck(callback: (status: string, details?: chrome.runtime.UpdateCheckDetails) => void)

Parameters

  • callback: (status: string, details?: chrome.runtime.UpdateCheckDetails) => void

restart()

sendMessage(message: any, responseCallback?: (response: any) => void)

Parameters

  • message: any
  • responseCallback?: (response: any) => void optional

sendMessage(message: any, options: MessageOptions, responseCallback?: (response: any) => void)

Parameters

  • message: any
  • options: MessageOptions
  • responseCallback?: (response: any) => void optional

sendMessage(extensionId: string, message: any, responseCallback?: (response: any) => void)

Parameters

  • extensionId: string
  • message: any
  • responseCallback?: (response: any) => void optional

sendMessage(extensionId: string, message: any, options: MessageOptions, responseCallback?: (response: any) => void)

Parameters

  • extensionId: string
  • message: any
  • options: MessageOptions
  • responseCallback?: (response: any) => void optional

sendNativeMessage(application: string, message: any, responseCallback?: (response: any) => void)

Parameters

  • application: string
  • message: any
  • responseCallback?: (response: any) => void optional

setUninstallUrl(url: string)

Parameters

  • url: string