function onNodeStart(node, walker) {
    // don't print this node if we should ignore it
    if (getTagName(node) === 'diff-container' || ignoreTags.includes(getTagName(node))) {
      return;
    }

    // don't print this node if it was already printed, this happens when
    // crawling upwards after handling children
    if (handledNodeStarted.has(node)) {
      return;
    }
    handledNodeStarted.add(node);

    if (node instanceof Text) {
      printText(node, walker);
    } else if (node instanceof Element) {
      printOpenElement(node);
    } else {
      throw new Error(`Unknown node type: ${node}`);
    }
  }
@param {Node} node
@param {TreeWalker} walker