mount = (raw, parent, after, isSvg, depth) => {
  if ( after === void 0 ) after = false;
  if ( isSvg === void 0 ) isSvg = false;
  if ( depth === void 0 ) depth = 0;

  parent = typeof parent === 'string' ? document.getElementById(parent) : parent;
  var nodes = flatten([raw]).map(filterNode);

  // console.log(1, 'MOUNT')

  var loop = function ( i ) {
    var nn = nodes[i];

    // console.log(2, nodes[i])
    if (nn instanceof Node) {
      append(nn, parent, after);
    } else
    if (nn && typeof nn.render === 'function') {
      // nn.$pointer = text('[pointer]');
      nn.$pointer = textNode('');
      append(nn.$pointer, parent, after);

      nodes[i].render(rendered => {
        // console.log(3, rendered)

        // Abort! Pointer was destroyed
        if (nn.$pointer === false) { return false; }

        for (var n = 0; n < rendered.length; n++) {
          if (nn.$pointer) {
            append(rendered[n], nn.$pointer, true);
          } else {
            append(rendered[n], parent, after);
          }
        }

        mountChildren(nn, nn.$isSvg, depth + 1);
      }, nn, depth, isSvg);
    }

    // if (!nn.html) {
    //   nn.$pointer = text('[pointer]');
    //   append(nn.$pointer, parent, after);
    // }
  };

  for (var i = 0; i < nodes.length; i++) loop( i );

  return nodes;
}
Appends structure[] to dom node
@param {*} component
@param {string} id
@param {boolean} isSvg
@param {number} depth
@returns {HTMLElement|Node}