Skip to content

Mountable

Defined in: packages/core/src/utils/Mountable.ts:1

new Mountable(): Mountable

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

Mountable

getTargetEl(): undefined | HTMLElement

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

Get the element that the mountable is currently mounted to.

undefined | HTMLElement


isMounted(): boolean

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

Check if the mountable is currently mounted.

boolean


mount(targetEl): void

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

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

Parameter Type Description

targetEl

HTMLElement

void


registerUnmountCb(cb): void

Defined in: packages/core/src/utils/Mountable.ts:91

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

Parameter Type Description

cb

() => void

void


unmount(): void

Defined in: packages/core/src/utils/Mountable.ts:70

Unmount the mountable from the current element.

void