const allElements = document.getElementsByTagName("*"); const allTagNames = new Set([].map.call(allElements, el => el.nodeName.toLowerCase()));