getElementById = (node, id) => {
  /** @type {?import('./types.js').XastElement} */
  let matched = null;
  visit(node, {
    element: {
      enter: (node) => {
        if (node.attributes.id === id) {
          matched = node;
        }
      },
    },
  });
  if (matched == null) {
    throw Error('Assert node');
  }
  return matched;
}
@param {import('./types.js').XastParent} node
@param {string} id
@returns {import('./types.js').XastElement}