EmbedPdfComponent
Defined in: src/obsidian/internals/EmbedRegistry/EmbedPdfComponent.d.ts:8
Extends
Section titled “Extends”Properties
Section titled “Properties”_children
Section titled “_children”_children:
Component
[]
Defined in: src/obsidian/augmentations/Components/Component.d.ts:13
Child Components attached to current component, will be unloaded on unloading parent component.
Inherited from
Section titled “Inherited from”_events
Section titled “_events”_events:
EventRef
[]
Defined in: src/obsidian/augmentations/Components/Component.d.ts:20
Events that are attached to the current component, will be detached on unloading parent component.
Inherited from
Section titled “Inherited from”_loaded
Section titled “_loaded”_loaded:
boolean
Defined in: src/obsidian/augmentations/Components/Component.d.ts:27
Whether the component and its children are loaded.
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”addChild()
Section titled “addChild()”Call Signature
Section titled “Call Signature”addChild<
T
>(component
):T
Defined in: obsidian.d.ts:911
Adds a child component, loading it if this component is loaded
Type Parameters
Section titled “Type Parameters”T
extends Component
Parameters
Section titled “Parameters”component
Section titled “component”T
Returns
Section titled “Returns”T
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”addChild<
T
>(component
):T
Defined in: src/obsidian/augmentations/Components/Component.d.ts:41
Adds a child component, loading it if this component is loaded.
Type Parameters
Section titled “Type Parameters”T
extends Component
The type of the component to add.
Parameters
Section titled “Parameters”component
Section titled “component”T
The component to add.
Returns
Section titled “Returns”T
The added component.
Example
Section titled “Example”component.addChild(childComponent);
Inherited from
Section titled “Inherited from”load()
Section titled “load()”Call Signature
Section titled “Call Signature”load():
void
Defined in: obsidian.d.ts:889
Load this component and its children
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”load():
void
Defined in: src/obsidian/augmentations/Components/Component.d.ts:48
Load this component and its children.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”onload()
Section titled “onload()”Call Signature
Section titled “Call Signature”onload():
void
Defined in: obsidian.d.ts:895
Override this to load your component
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”onload():
void
Defined in: src/obsidian/augmentations/Components/Component.d.ts:64
Override this to load your component.
Returns
Section titled “Returns”void
Example
Section titled “Example”class MyComponent extends Component { public override onload(): void { console.log('MyComponent loaded'); }}
Inherited from
Section titled “Inherited from”onunload()
Section titled “onunload()”onunload():
void
Defined in: obsidian.d.ts:906
Override this to unload your component
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”register()
Section titled “register()”Call Signature
Section titled “Call Signature”register(
cb
):void
Defined in: obsidian.d.ts:921
Registers a callback to be called when unloading
Parameters
Section titled “Parameters”() => any
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”register(
cb
):void
Defined in: src/obsidian/augmentations/Components/Component.d.ts:78
Registers a callback to be called when unloading.
Parameters
Section titled “Parameters”() => any
The callback to be called when unloading.
Returns
Section titled “Returns”void
Example
Section titled “Example”component.register(() => { console.log('MyComponent unloaded');});
Inherited from
Section titled “Inherited from”registerDomEvent()
Section titled “registerDomEvent()”Call Signature
Section titled “Call Signature”registerDomEvent<
K
>(el
,type
,callback
,options?
):void
Defined in: obsidian.d.ts:931
Registers an DOM event to be detached when unloading
Type Parameters
Section titled “Type Parameters”K
extends keyof WindowEventMap
Parameters
Section titled “Parameters”K
callback
Section titled “callback”(this
, ev
) => any
options?
Section titled “options?”boolean
| AddEventListenerOptions
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”registerDomEvent<
K
>(el
,type
,callback
,options?
):void
Defined in: obsidian.d.ts:936
Registers an DOM event to be detached when unloading
Type Parameters
Section titled “Type Parameters”K
extends keyof DocumentEventMap
Parameters
Section titled “Parameters”K
callback
Section titled “callback”(this
, ev
) => any
options?
Section titled “options?”boolean
| AddEventListenerOptions
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”registerDomEvent<
K
>(el
,type
,callback
,options?
):void
Defined in: obsidian.d.ts:941
Registers an DOM event to be detached when unloading
Type Parameters
Section titled “Type Parameters”K
extends keyof HTMLElementEventMap
Parameters
Section titled “Parameters”K
callback
Section titled “callback”(this
, ev
) => any
options?
Section titled “options?”boolean
| AddEventListenerOptions
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”registerDomEvent<
K
>(el
,type
,callback
,options?
):void
Defined in: src/obsidian/augmentations/Components/Component.d.ts:96
Registers an DOM event to be detached when unloading.
Type Parameters
Section titled “Type Parameters”K
extends keyof DocumentEventMap
The type of the event to register.
Parameters
Section titled “Parameters”The element to register the event on.
K
The type of the event to register.
callback
Section titled “callback”(this
, ev
) => any
The callback to be called when the event is triggered.
options?
Section titled “options?”The options for the event.
boolean
| AddEventListenerOptions
Returns
Section titled “Returns”void
Example
Section titled “Example”component.registerDomEvent(document, 'click', () => { console.log('Document clicked');});
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”registerDomEvent<
K
>(el
,type
,callback
,options?
):void
Defined in: src/obsidian/augmentations/Components/Component.d.ts:119
Registers an DOM event to be detached when unloading.
Type Parameters
Section titled “Type Parameters”K
extends keyof HTMLElementEventMap
The type of the event to register.
Parameters
Section titled “Parameters”The element to register the event on.
K
The type of the event to register.
callback
Section titled “callback”(this
, ev
) => any
The callback to be called when the event is triggered.
options?
Section titled “options?”The options for the event.
boolean
| AddEventListenerOptions
Returns
Section titled “Returns”void
Example
Section titled “Example”component.registerDomEvent(document.body, 'click', () => { console.log('Body clicked');});
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”registerDomEvent<
K
>(el
,type
,callback
,options?
):void
Defined in: src/obsidian/augmentations/Components/Component.d.ts:142
Registers an DOM event to be detached when unloading.
Type Parameters
Section titled “Type Parameters”K
extends keyof WindowEventMap
The type of the event to register.
Parameters
Section titled “Parameters”The element to register the event on.
K
The type of the event to register.
callback
Section titled “callback”(this
, ev
) => any
The callback to be called when the event is triggered.
options?
Section titled “options?”The options for the event.
boolean
| AddEventListenerOptions
Returns
Section titled “Returns”void
Example
Section titled “Example”component.registerDomEvent(window, 'click', () => { console.log('Window clicked');});
Inherited from
Section titled “Inherited from”registerEvent()
Section titled “registerEvent()”Call Signature
Section titled “Call Signature”registerEvent(
eventRef
):void
Defined in: obsidian.d.ts:926
Registers an event to be detached when unloading
Parameters
Section titled “Parameters”eventRef
Section titled “eventRef”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”registerEvent(
eventRef
):void
Defined in: src/obsidian/augmentations/Components/Component.d.ts:159
Registers an event to be detached when unloading.
Parameters
Section titled “Parameters”eventRef
Section titled “eventRef”The event to be registered.
Returns
Section titled “Returns”void
Example
Section titled “Example”component.registerEvent(eventRef);
Inherited from
Section titled “Inherited from”registerInterval()
Section titled “registerInterval()”Call Signature
Section titled “Call Signature”registerInterval(
id
):number
Defined in: obsidian.d.ts:948
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
Section titled “Parameters”number
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”registerInterval(
id
):number
Defined in: src/obsidian/augmentations/Components/Component.d.ts:175
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
Section titled “Parameters”number
The id of the interval to register.
Returns
Section titled “Returns”number
The id of the interval.
Example
Section titled “Example”component.registerInterval(window.setInterval(() => { console.log('Interval');}, 1000));
Inherited from
Section titled “Inherited from”registerScopeEvent()
Section titled “registerScopeEvent()”registerScopeEvent(
keymapEventHandler
):void
Defined in: src/obsidian/augmentations/Components/Component.d.ts:181
Parameters
Section titled “Parameters”keymapEventHandler
Section titled “keymapEventHandler”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”removeChild()
Section titled “removeChild()”Call Signature
Section titled “Call Signature”removeChild<
T
>(component
):T
Defined in: obsidian.d.ts:916
Removes a child component, unloading it
Type Parameters
Section titled “Type Parameters”T
extends Component
Parameters
Section titled “Parameters”component
Section titled “component”T
Returns
Section titled “Returns”T
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”removeChild<
T
>(component
):T
Defined in: src/obsidian/augmentations/Components/Component.d.ts:195
Removes a child component, unloading it.
Type Parameters
Section titled “Type Parameters”T
extends Component
The type of the component to remove.
Parameters
Section titled “Parameters”component
Section titled “component”T
The component to remove.
Returns
Section titled “Returns”T
The removed component.
Example
Section titled “Example”component.removeChild(childComponent);
Inherited from
Section titled “Inherited from”unload()
Section titled “unload()”Call Signature
Section titled “Call Signature”unload():
void
Defined in: obsidian.d.ts:900
Unload this component and its children
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”unload():
void
Defined in: src/obsidian/augmentations/Components/Component.d.ts:211
Override this to unload your component.
Returns
Section titled “Returns”void
Example
Section titled “Example”class MyComponent extends Component { public override onunload(): void { console.log('MyComponent unloaded'); }}