Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ScriptArguments

Script arguments.

Hierarchy

Index

Properties

emit

emit: function

Emits an event.

param

The event to emit.

param

Additional arguments for the event.

returns

Event was emitted or not.

Type declaration

    • (event: string | Symbol, ...args: any[]): boolean
    • Parameters

      • event: string | Symbol
      • Rest ...args: any[]

      Returns boolean

globalState

globalState: Object

Gets an object that stores data for all scripts.

globals

globals: any

The global data from the settings.

log

log: function

Logs a message.

param

The message to log.

chainable

Type declaration

on

on: function

Registers for an event.

param

The event to register for.

param

The event listener.

chainable

Type declaration

once

once: function

Registers for an one-time event.

param

The event to register for.

param

The event listener.

chainable

Type declaration

openHtml

openHtml: function

Opens a HTML document in a new tab.

param

The HTML document (source code).

param

The custom title for the tab.

param

The custom ID for the document in the storage.

returns

The promise.

Type declaration

    • (html: string, title?: string, id?: any): Thenable<any>
    • Parameters

      • html: string
      • Optional title: string
      • Optional id: any

      Returns Thenable<any>

options

options: any

Additional / optional data for the execution.

outputChannel

outputChannel: OutputChannel

Gets the output channel the script can use.

removeListener

removeListener: function

Registers for an one-time event.

param

The event to register for.

param

The event listener.

chainable

Type declaration

require

require: function

Loads a module from the script context.

param

The ID of the module.

returns

any The loaded module.

Type declaration

    • (id: string): any
    • Parameters

      • id: string

      Returns any

state

state: any

Gets or sets a value for the script that is available while the current session.

Generated using TypeDoc