Skip to content

Interface: GlobalCtxWithAPI

addons/api/api.GlobalCtxWithAPI

Hierarchy

  • GlobalCtx

    GlobalCtxWithAPI

Table of contents

Properties

Methods

Properties

addons

addons: Record<string, AddonManifest>

Inherited from

GlobalCtx.addons


api

api: CharlotteAPI


app

app: __module = app

Inherited from

GlobalCtx.app


instances

instances: Object

Type declaration

NameType
blockly?RealBlockly
vm?VM

loader

loader: src/core/loader/loader = loader

Inherited from

GlobalCtx.loader


settings

settings: Settings = settings

Inherited from

GlobalCtx.settings


version

version: string

Inherited from

GlobalCtx.version

Methods

addListener

addListener<T>(event, fn, context?): this

Type parameters

NameType
Textends string | symbol

Parameters

NameType
eventT
fn(...args: any[]) => void
context?any

Returns

this

Inherited from

GlobalCtx.addListener


emit

emit<T>(event, ...args): boolean

Calls each of the listeners registered for a given event.

Type parameters

NameType
Textends string | symbol

Parameters

NameType
eventT
...argsany[]

Returns

boolean

Inherited from

GlobalCtx.emit


eventNames

eventNames(): (string | symbol)[]

Return an array listing the events for which the emitter has registered listeners.

Returns

(string | symbol)[]

Inherited from

GlobalCtx.eventNames


getLocale

getLocale(): string

Returns

string

Inherited from

GlobalCtx.getLocale


listenerCount

listenerCount(event): number

Return the number of listeners listening to a given event.

Parameters

NameType
eventstring | symbol

Returns

number

Inherited from

GlobalCtx.listenerCount


listeners

listeners<T>(event): (...args: any[]) => void[]

Return the listeners registered for a given event.

Type parameters

NameType
Textends string | symbol

Parameters

NameType
eventT

Returns

(...args: any[]) => void[]

Inherited from

GlobalCtx.listeners


off

off<T>(event, fn?, context?, once?): this

Type parameters

NameType
Textends string | symbol

Parameters

NameType
eventT
fn?(...args: any[]) => void
context?any
once?boolean

Returns

this

Inherited from

GlobalCtx.off


on

on<T>(event, fn, context?): this

Add a listener for a given event.

Type parameters

NameType
Textends string | symbol

Parameters

NameType
eventT
fn(...args: any[]) => void
context?any

Returns

this

Inherited from

GlobalCtx.on


once

once<T>(event, fn, context?): this

Add a one-time listener for a given event.

Type parameters

NameType
Textends string | symbol

Parameters

NameType
eventT
fn(...args: any[]) => void
context?any

Returns

this

Inherited from

GlobalCtx.once


reloadAddonList

reloadAddonList(): void

Returns

void

Inherited from

GlobalCtx.reloadAddonList


removeAllListeners

removeAllListeners(event?): this

Remove all listeners, or those of the specified event.

Parameters

NameType
event?string | symbol

Returns

this

Inherited from

GlobalCtx.removeAllListeners


removeListener

removeListener<T>(event, fn?, context?, once?): this

Remove the listeners of a given event.

Type parameters

NameType
Textends string | symbol

Parameters

NameType
eventT
fn?(...args: any[]) => void
context?any
once?boolean

Returns

this

Inherited from

GlobalCtx.removeListener

Powered by TypeDoc & VitePress.