@tempots/dom
Portal() function
Renders the given node
into a DOM element selected by the provided selector
. Throws an error if the element cannot be found.
Signature:
Portal: (selector: string, node: TNode) => Renderable
Parameters
Parameter |
Type |
Description |
---|---|---|
selector |
string |
The CSS selector for the target DOM element. |
node |
The node to be rendered. |
Returns: Renderable
The result of rendering the node
into the selected DOM element.