code: function createElement(node, document) {
  	var tag = void 0;
  	if ((typeof node === 'undefined' ? 'undefined' : _typeof(node)) !== 'object') {
  		// we have a text node, so create one
  		tag = document.createTextNode('' + node);
  	} else {
  		tag = document.createElement(node.tagName);
  		// add all required attributes
  		Object.keys(node.attributes).forEach(function (attr) {
  			tag.setAttribute(attr, node.attributes[attr].value);
  		});
  		// define it's inner structure
  		tag.innerHTML = getInnerHTML(node);
  		tag.__hash = node.__hash;
  		attachSetAttribute(tag);
  	}
  
  	return tag;
  }
docs: Creates a new DOM node
  
  @param  {Object|String} node - a VDOM node
  @param  {Document} document - the document in which to create the DOM node
  @return {Node} - the DOM node created (either a text element or an HTML element)