4 const htmlTags = require("html-tags");
5 const keywordSets = require("../reference/keywordSets");
6 const mathMLTags = require("mathml-tag-names");
7 const svgTags = require("svg-tags");
10 * Check whether a type selector is a custom element
12 module.exports = function(selector /*: string*/) /*: boolean*/ {
13 if (!/^[a-z]/.test(selector)) {
17 if (selector.indexOf("-") === -1) {
21 const selectorLowerCase = selector.toLowerCase();
23 if (selectorLowerCase !== selector) {
26 if (svgTags.indexOf(selectorLowerCase) !== -1) {
29 if (htmlTags.indexOf(selectorLowerCase) !== -1) {
32 if (keywordSets.nonStandardHtmlTags.has(selectorLowerCase)) {
35 if (mathMLTags.indexOf(selectorLowerCase) !== -1) {