Skip to content

MarkdownRenderChild

Defined in: publish.d.ts:459

Extends

Constructors

new MarkdownRenderChild()

new MarkdownRenderChild(containerEl): MarkdownRenderChild

Defined in: publish.d.ts:469

Parameters

containerEl

HTMLElement

This HTMLElement will be used to test whether this component is still alive. It should be a child of the Markdown preview sections, and when it’s no longer attached (for example, when it is replaced with a new version because the user edited the Markdown source code), this component will be unloaded.

Returns

MarkdownRenderChild

Overrides

Component.constructor

Properties

containerEl

containerEl: HTMLElement

Defined in: publish.d.ts:461

Methods

addChild()

addChild<T>(component): T

Defined in: publish.d.ts:305

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


load()

load(): void

Defined in: publish.d.ts:283

Load this component and its children

Returns

void

Inherited from

Component.load


onload()

onload(): void

Defined in: publish.d.ts:289

Override this to load your component

Returns

void

Inherited from

Component.onload


onunload()

onunload(): void

Defined in: publish.d.ts:300

Override this to unload your component

Returns

void

Inherited from

Component.onunload


register()

register(cb): void

Defined in: publish.d.ts:315

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: publish.d.ts:325

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: publish.d.ts:330

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: publish.d.ts:335

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: publish.d.ts:320

Registers an event to be detached when unloading

Parameters

eventRef

EventRef

Returns

void

Inherited from

Component.registerEvent


registerInterval()

registerInterval(id): number

Defined in: publish.d.ts:342

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

Parameters

id

number

Returns

number

Inherited from

Component.registerInterval


removeChild()

removeChild<T>(component): T

Defined in: publish.d.ts:310

Removes a child component, unloading it

Type Parameters

T extends Component

Parameters

component

T

Returns

T

Inherited from

Component.removeChild


unload()

unload(): void

Defined in: publish.d.ts:294

Unload this component and its children

Returns

void

Inherited from

Component.unload