allow document level hydration (#5547).

pull/5743/head
jimafisk 5 years ago
parent e02c291050
commit 3ff2e00aa0

@ -5,8 +5,10 @@ export function append(target: Node, node: Node) {
} }
export function insert(target: Node, node: Node, anchor?: Node) { export function insert(target: Node, node: Node, anchor?: Node) {
if (target != document) {
target.insertBefore(node, anchor || null); target.insertBefore(node, anchor || null);
} }
}
export function detach(node: Node) { export function detach(node: Node) {
node.parentNode.removeChild(node); node.parentNode.removeChild(node);

Loading…
Cancel
Save