Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface BrowserItem

A browser item.

Hierarchy

Implemented by

Index

Constructors

constructor

  • new BrowserItem(callOnDispose: Function): BrowserItem
  • Creates a new Disposable calling the provided function on dispose.

    Parameters

    • callOnDispose: Function

      Function that disposes something.

    Returns BrowserItem

Properties

close

close: function

Closes the connection to the item.

returns

The promise that indicates if operation was successful or not.

Type declaration

    • (): PromiseLike<boolean>
    • Returns PromiseLike<boolean>

connect

connect: function

Options a connection to the item.

returns

The promise that indicates if operation was successful or not.

Type declaration

    • (): PromiseLike<boolean>
    • Returns PromiseLike<boolean>

Optional description

description: string

The description.

id

id: string

The ID of the item.

isConnected

isConnected: boolean

Indicates if a connection to the item has been established or not.

send

send: function

Invokes a method for the item.

param

The method to invoke.

param

Parameters for the method.

param

The optional callback.

Type declaration

socketUri

socketUri: string

Gets the underyling (web) socket URI.

Methods

addListener

  • addListener(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

dispose

  • dispose(): any
  • Dispose this object.

    Returns any

emit

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

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

    Returns boolean

eventNames

  • eventNames(): (string | symbol)[]
  • Returns (string | symbol)[]

getMaxListeners

  • getMaxListeners(): number
  • Returns number

listenerCount

  • listenerCount(type: string | symbol): number
  • Parameters

    • type: string | symbol

    Returns number

listeners

  • listeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

on

  • on(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

once

  • once(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

prependListener

  • prependListener(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

removeAllListeners

  • removeAllListeners(event?: string | symbol): this
  • Parameters

    • Optional event: string | symbol

    Returns this

removeListener

  • removeListener(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

setMaxListeners

  • setMaxListeners(n: number): this
  • Parameters

    • n: number

    Returns this

Static from

  • from(...disposableLikes: object[]): Disposable
  • Combine many disposable-likes into one. Use this method when having objects with a dispose function which are not instances of Disposable.

    Parameters

    • Rest ...disposableLikes: object[]

      Objects that have at least a dispose-function member.

    Returns Disposable

    Returns a new disposable which, upon dispose, will dispose all provided disposables.

Generated using TypeDoc