Home Reference Source
import Tray from '@osjs/client/src/tray.js'
public class | source

Tray

Tray Handler

Constructor Summary

Public Constructor
public

constructor(core: Core)

Creates the Tray Handler

Member Summary

Public Members
public

Core instance reference

public

All Tray entries

Method Summary

Public Methods
public

create(options: TrayEntryData, handler: Function): TrayEntry

Creates a new Tray entry

public

Destroys instance

public

has(key: *): Boolean

public
public

remove(entry: TrayEntry)

Removes a Tray entry

Public Constructors

public constructor(core: Core) source

Creates the Tray Handler

Params:

NameTypeAttributeDescription
core Core

Core reference

Public Members

public core: Core source

Core instance reference

public entries: TrayEntry[] source

All Tray entries

Public Methods

public create(options: TrayEntryData, handler: Function): TrayEntry source

Creates a new Tray entry

Params:

NameTypeAttributeDescription
options TrayEntryData

Options

handler Function
  • optional

The callback function for all events

Return:

TrayEntry

public destroy() source

Destroys instance

public has(key: *): Boolean source

Params:

NameTypeAttributeDescription
key *

Return:

Boolean

public list(): TrayEntry[] source

Return:

TrayEntry[]

public remove(entry: TrayEntry) source

Removes a Tray entry

Params:

NameTypeAttributeDescription
entry TrayEntry

The tray entry