Skip to content

Mountable

Extended by

Constructors

new Mountable()

new Mountable(): Mountable

Returns

Mountable

Defined in

packages/core/src/utils/Mountable.ts:6

Methods

getTargetEl()

getTargetEl(): undefined | HTMLElement

Get the element that the mountable is currently mounted to.

Returns

undefined | HTMLElement

Defined in

packages/core/src/utils/Mountable.ts:22


isMounted()

isMounted(): boolean

Check if the mountable is currently mounted.

Returns

boolean

Defined in

packages/core/src/utils/Mountable.ts:15


mount()

mount(targetEl): void

Mount the mountable to the given element. Will throw an error if the mountable is already mounted.

Parameters

Parameter Type Description

targetEl

HTMLElement

Returns

void

Defined in

packages/core/src/utils/Mountable.ts:50


registerUnmountCb()

registerUnmountCb(cb): void

Register a callback that will be called when the mountable is unmounted.

Parameters

Parameter Type Description

cb

() => void

Returns

void

Defined in

packages/core/src/utils/Mountable.ts:85


unmount()

unmount(): void

Unmount the mountable from the current element. Will throw an error if the mountable is not mounted.

Returns

void

Defined in

packages/core/src/utils/Mountable.ts:65