return element
}
-// export function nodeOrNew (name, node) {
-// return node instanceof globals.window.Node ? node : create(name)
-// }
export function nodeOrNew (name, node) {
- //console.log(node)
- return (node && 'ownerDocument' in node && node instanceof node.ownerDocument.defaultView.Node) ? node : create(name)
+ return (node && node.ownerDocument && node instanceof node.ownerDocument.defaultView.Node) ? node : create(name)
}
// Adopt existing svg elements