/** * Tools for SVG Root Element. * @module svgcanvas * @license MIT * * @copyright 2010 Alexis Deveria, 2010 Jeff Schiller */ import { NS } from './namespaces.js' import { text2xml } from './utilities.js' /** * @function module:svgcanvas.svgRootElement svgRootElement the svg node and its children. * @param {Element} svgdoc - window.document * @param {ArgumentsArray} dimensions - dimensions of width and height * @returns {svgRootElement} */ export const svgRootElement = (svgdoc, dimensions) => { return svgdoc.importNode( text2xml( ` ` ).documentElement, true ) }