Ejemplo n.º 1
0
function render(that, dom, options) {
  if (!dom) {
    if (that._root && that._root.children) {
      dom = that._root.children;
    } else {
      return '';
    }
  } else if (typeof dom === 'string') {
    dom = select(dom, that._root, options);
  }

  return serialize(dom, options);
}
Ejemplo n.º 2
0
exports.cloneDom = function(dom, options) {
  return parse(render(dom, options), options).children;
};