JSFiddle - React, Tailwind, and code Playground

HTML

<body name="body_">
    Log: <pre style="width:100%;" id="logoutput"></pre>
</body>

JavaScript

function log(arg) {
  document.getElementById('logoutput').textContent += `${arg}\n`;
}

function init() {
  // return;
  var els = ["a", "abbr", "acronym", "address", "applet", "area", "article", "aside", "audio", "b", "base", "basefont", "bb", "bdi", "bdo", "big", "blockquote", /* "body" */ , "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "command", "data", "datagrid", "datalist", "dd", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "em", "embed", "eventsource", "fieldset", "figcaption", "figure", "font", "footer", "form", "frame", "frameset", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "iframe", "img", "input", "ins", "isindex", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "menu", "menuitem", "meta", "meter", "nav", "noframes", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "pre", "progress", "q", "rb", "rp", "rt", "rtc", "ruby", "s", "samp", "script", "section", "select", "small", "source", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "title", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]
  var root = document.body;
  
  log(`Initial type of document.querySelectorAll: ${typeof(document.querySelectorAll)}`);

  for (var i = 0; i < els.length; i++) {
    let el = document.createElement(els[i]);
    el.name = `${els[i]}_`;
    root.appendChild(el);
    
    // Let's see if document is polluted by this name
    if (el.name in document) {
      log(`document.${el.name} exists`);
    }
    
    // Let's see if it can overwrite stuff in document
    el.name = 'querySelectorAll';
    if (typeof(document.querySelectorAll) !== 'function') {
        log(`querySelectorAll overwritten by '${els[i]}' (new type: ${typeof(document.querySelectorAll)})\n`);
    }
    el.name = `${els[i]}_`;
  }
}

init();
// embed form iframe img...