src/artoo.helpers.js
function createDocument(root, namespace) {
    if (!root)
      return document.implementation.createHTMLDocument();
    else
      return document.implementation.createDocument(
        namespace || null,
        root,
        null
      );
  }
function createDocument(root, namespace) {
    if (!root)
      return document.implementation.createHTMLDocument();
    else
      return document.implementation.createDocument(
        namespace || null,
        root,
        null
      );
  }
function createDocument ( root , namespace ) { if ( ! root ) return document . implementation . createHTMLDocument ( ) ; else return document . implementation . createDocument ( namespace || null , root , null ) ; }
Creating an HTML or XML document
Creating an HTML or XML document