Mountable
Defined in: packages/core/src/utils/Mountable.ts:1
Extended by
Section titled “Extended by”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Mountable():
Mountable
Defined in: packages/core/src/utils/Mountable.ts:6
Returns
Section titled “Returns”Mountable
Methods
Section titled “Methods”getTargetEl()
Section titled “getTargetEl()”getTargetEl():
undefined|HTMLElement
Defined in: packages/core/src/utils/Mountable.ts:22
Get the element that the mountable is currently mounted to.
Returns
Section titled “Returns”undefined | HTMLElement
isMounted()
Section titled “isMounted()”isMounted():
boolean
Defined in: packages/core/src/utils/Mountable.ts:15
Check if the mountable is currently mounted.
Returns
Section titled “Returns”boolean
mount()
Section titled “mount()”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.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
|
|
Returns
Section titled “Returns”void
registerUnmountCb()
Section titled “registerUnmountCb()”registerUnmountCb(
cb):void
Defined in: packages/core/src/utils/Mountable.ts:91
Register a callback that will be called when the mountable is unmounted.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
|
|
() => |
Returns
Section titled “Returns”void
unmount()
Section titled “unmount()”unmount():
void
Defined in: packages/core/src/utils/Mountable.ts:70
Unmount the mountable from the current element.
Returns
Section titled “Returns”void