Remove deprecated portal implementation
This commit is contained in:
parent
27c3e6c9e9
commit
bfec3327fb
|
@ -1,14 +0,0 @@
|
||||||
export function portal(node, targetNodeOrSelector) {
|
|
||||||
const targetNode =
|
|
||||||
typeof targetNodeOrSelector == "string"
|
|
||||||
? document.querySelector(targetNodeOrSelector)
|
|
||||||
: targetNodeOrSelector
|
|
||||||
const portalChildren = [...node.children]
|
|
||||||
targetNode.append(...portalChildren)
|
|
||||||
|
|
||||||
return {
|
|
||||||
destroy() {
|
|
||||||
for (const portalChild of portalChildren) portalChild.remove()
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue