Skip to content

CanvasIndex

Defined in: src/obsidian/internals/InternalPlugins/Canvas/CanvasIndex.d.ts:9

Extends

Properties

_children

_children: Component[]

Defined in: src/obsidian/augmentations/Components/Component.d.ts:9

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

Inherited from

Component._children


_events

_events: EventRef[]

Defined in: src/obsidian/augmentations/Components/Component.d.ts:13

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

Inherited from

Component._events


_loaded

_loaded: boolean

Defined in: src/obsidian/augmentations/Components/Component.d.ts:17

Whether the component and its children are loaded

Inherited from

Component._loaded


app

app: App

Defined in: src/obsidian/internals/InternalPlugins/Canvas/CanvasIndex.d.ts:10


fileQueue

fileQueue: unknown[]

Defined in: src/obsidian/internals/InternalPlugins/Canvas/CanvasIndex.d.ts:11


frame

frame: null

Defined in: src/obsidian/internals/InternalPlugins/Canvas/CanvasIndex.d.ts:12


index

index: Record<string, CanvasIndexEntry>

Defined in: src/obsidian/internals/InternalPlugins/Canvas/CanvasIndex.d.ts:13


refNodeIds

refNodeIds: WeakMap<object, unknown>

Defined in: src/obsidian/internals/InternalPlugins/Canvas/CanvasIndex.d.ts:14

Methods

addChild()

addChild<T>(component): T

Defined in: obsidian.d.ts:887

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

Defined in: src/obsidian/internals/InternalPlugins/Canvas/CanvasIndex.d.ts:16

Parameters

arg1

unknown

Returns

unknown


get()

get(arg1): unknown

Defined in: src/obsidian/internals/InternalPlugins/Canvas/CanvasIndex.d.ts:17

Parameters

arg1

unknown

Returns

unknown


getAll()

getAll(): unknown

Defined in: src/obsidian/internals/InternalPlugins/Canvas/CanvasIndex.d.ts:18

Returns

unknown


getForPath()

getForPath(arg1): unknown

Defined in: src/obsidian/internals/InternalPlugins/Canvas/CanvasIndex.d.ts:19

Parameters

arg1

unknown

Returns

unknown


load()

load(): void

Defined in: obsidian.d.ts:865

Load this component and its children

Returns

void

Inherited from

Component.load


onCreate()

onCreate(arg1): unknown

Defined in: src/obsidian/internals/InternalPlugins/Canvas/CanvasIndex.d.ts:20

Parameters

arg1

unknown

Returns

unknown


onDelete()

onDelete(arg1): unknown

Defined in: src/obsidian/internals/InternalPlugins/Canvas/CanvasIndex.d.ts:21

Parameters

arg1

unknown

Returns

unknown


onload()

onload(): unknown

Defined in: src/obsidian/internals/InternalPlugins/Canvas/CanvasIndex.d.ts:22

Override this to load your component

Returns

unknown

Overrides

Component.onload


onModify()

onModify(arg1): unknown

Defined in: src/obsidian/internals/InternalPlugins/Canvas/CanvasIndex.d.ts:23

Parameters

arg1

unknown

Returns

unknown


onRename()

onRename(arg1, arg2): unknown

Defined in: src/obsidian/internals/InternalPlugins/Canvas/CanvasIndex.d.ts:24

Parameters

arg1

unknown

arg2

unknown

Returns

unknown


onunload()

onunload(): unknown

Defined in: src/obsidian/internals/InternalPlugins/Canvas/CanvasIndex.d.ts:25

Override this to unload your component

Returns

unknown

Overrides

Component.onunload


parseText()

parseText(arg1): Promise<unknown>

Defined in: src/obsidian/internals/InternalPlugins/Canvas/CanvasIndex.d.ts:26

Parameters

arg1

unknown

Returns

Promise<unknown>


process()

process(arg1): Promise<unknown>

Defined in: src/obsidian/internals/InternalPlugins/Canvas/CanvasIndex.d.ts:27

Parameters

arg1

unknown

Returns

Promise<unknown>


queue()

queue(arg1): unknown

Defined in: src/obsidian/internals/InternalPlugins/Canvas/CanvasIndex.d.ts:28

Parameters

arg1

unknown

Returns

unknown


register()

register(cb): void

Defined in: obsidian.d.ts:897

Registers a callback to be called when unloading

Parameters

cb

() => any

Returns

void

Inherited from

Component.register


registerDomEvent()

Call Signature

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

Defined in: obsidian.d.ts:907

Registers an DOM event to be detached when unloading

Type Parameters

K extends keyof WindowEventMap

Parameters
el

Window

type

K

callback

(this, ev) => any

options?

boolean | AddEventListenerOptions

Returns

void

Inherited from

Component.registerDomEvent

Call Signature

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

Defined in: obsidian.d.ts:912

Registers an DOM event to be detached when unloading

Type Parameters

K extends keyof DocumentEventMap

Parameters
el

Document

type

K

callback

(this, ev) => any

options?

boolean | AddEventListenerOptions

Returns

void

Inherited from

Component.registerDomEvent

Call Signature

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

Defined in: obsidian.d.ts:917

Registers an DOM event to be detached when unloading

Type Parameters

K extends keyof HTMLElementEventMap

Parameters
el

HTMLElement

type

K

callback

(this, ev) => any

options?

boolean | AddEventListenerOptions

Returns

void

Inherited from

Component.registerDomEvent


registerEvent()

registerEvent(eventRef): void

Defined in: obsidian.d.ts:902

Registers an event to be detached when unloading

Parameters

eventRef

EventRef

Returns

void

Inherited from

Component.registerEvent


registerInterval()

registerInterval(id): number

Defined in: obsidian.d.ts:924

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

Defined in: src/obsidian/augmentations/Components/Component.d.ts:19

Parameters

keymapEventHandler

KeymapEventHandler

Returns

void

Inherited from

Component.registerScopeEvent


removeChild()

removeChild<T>(component): T

Defined in: obsidian.d.ts:892

Removes a child component, unloading it

Type Parameters

T extends Component

Parameters

component

T

Returns

T

Inherited from

Component.removeChild


requestFrame()

requestFrame(): unknown

Defined in: src/obsidian/internals/InternalPlugins/Canvas/CanvasIndex.d.ts:29

Returns

unknown


run()

run(): Promise<unknown>

Defined in: src/obsidian/internals/InternalPlugins/Canvas/CanvasIndex.d.ts:30

Returns

Promise<unknown>


unload()

unload(): void

Defined in: obsidian.d.ts:876

Unload this component and its children

Returns

void

Inherited from

Component.unload