Skip to content

CanvasIndex

Extends

Properties

_children

_children: Component[]

Child Components attached to current component, will be unloaded on unloading parent component

Inherited from

Component._children


_events

_events: EventRef[]

Events that are attached to the current component, will be detached on unloading parent component

Inherited from

Component._events


_loaded

_loaded: boolean

Whether the component and its children are loaded

Inherited from

Component._loaded


app

app: App


fileQueue

fileQueue: unknown[]


frame

frame: null


index

index: Record<string, CanvasIndexEntry>


refNodeIds

refNodeIds: WeakMap<object, unknown>

Methods

addChild()

addChild<T>(component): T

Adds a child component, loading it if this component is loaded

Type Parameters

T extends Component

Parameters

component: T

Returns

T

Inherited from

Component.addChild


canProcess()

canProcess(arg1): unknown

Parameters

arg1: unknown

Returns

unknown


get()

get(arg1): unknown

Parameters

arg1: unknown

Returns

unknown


getAll()

getAll(): unknown

Returns

unknown


getForPath()

getForPath(arg1): unknown

Parameters

arg1: unknown

Returns

unknown


load()

load(): void

Load this component and its children

Returns

void

Inherited from

Component.load


onCreate()

onCreate(arg1): unknown

Parameters

arg1: unknown

Returns

unknown


onDelete()

onDelete(arg1): unknown

Parameters

arg1: unknown

Returns

unknown


onload()

onload(): unknown

Override this to load your component

Returns

unknown

Overrides

Component.onload


onModify()

onModify(arg1): unknown

Parameters

arg1: unknown

Returns

unknown


onRename()

onRename(arg1, arg2): unknown

Parameters

arg1: unknown

arg2: unknown

Returns

unknown


onunload()

onunload(): unknown

Override this to unload your component

Returns

unknown

Overrides

Component.onunload


parseText()

parseText(arg1): Promise<unknown>

Parameters

arg1: unknown

Returns

Promise<unknown>


process()

process(arg1): Promise<unknown>

Parameters

arg1: unknown

Returns

Promise<unknown>


queue()

queue(arg1): unknown

Parameters

arg1: unknown

Returns

unknown


register()

register(cb): void

Registers a callback to be called when unloading

Parameters

cb

Returns

void

Inherited from

Component.register


registerDomEvent()

registerDomEvent(el, type, callback, options)

registerDomEvent<K>(el, type, callback, options?): void

Registers an DOM event to be detached when unloading

Type Parameters

K extends keyof WindowEventMap

Parameters

el: Window

type: K

callback

options?: boolean | AddEventListenerOptions

Returns

void

Inherited from

Component.registerDomEvent

registerDomEvent(el, type, callback, options)

registerDomEvent<K>(el, type, callback, options?): void

Registers an DOM event to be detached when unloading

Type Parameters

K extends keyof DocumentEventMap

Parameters

el: Document

type: K

callback

options?: boolean | AddEventListenerOptions

Returns

void

Inherited from

Component.registerDomEvent

registerDomEvent(el, type, callback, options)

registerDomEvent<K>(el, type, callback, options?): void

Registers an DOM event to be detached when unloading

Type Parameters

K extends keyof HTMLElementEventMap

Parameters

el: HTMLElement

type: K

callback

options?: boolean | AddEventListenerOptions

Returns

void

Inherited from

Component.registerDomEvent


registerEvent()

registerEvent(eventRef): void

Registers an event to be detached when unloading

Parameters

eventRef: EventRef

Returns

void

Inherited from

Component.registerEvent


registerInterval()

registerInterval(id): number

Registers an interval (from setInterval) to be cancelled when unloading Use setInterval instead of setInterval to avoid TypeScript confusing between NodeJS vs Browser API

Parameters

id: number

Returns

number

Inherited from

Component.registerInterval


registerScopeEvent()

registerScopeEvent(keymapEventHandler): void

Parameters

keymapEventHandler: KeymapEventHandler

Returns

void

Inherited from

Component.registerScopeEvent


removeChild()

removeChild<T>(component): T

Removes a child component, unloading it

Type Parameters

T extends Component

Parameters

component: T

Returns

T

Inherited from

Component.removeChild


requestFrame()

requestFrame(): unknown

Returns

unknown


run()

run(): Promise<unknown>

Returns

Promise<unknown>


unload()

unload(): void

Unload this component and its children

Returns

void

Inherited from

Component.unload