MCPcopy
hub / github.com/webpack/webpack / isSpecial

Function isSpecial

lib/html/syntax.js:4045–4050  ·  view source on GitHub ↗
(/** @type {HtmlElement} */ el)

Source from the content-addressed store, hash-verified

4043const HEADING = new Set(["h1", "h2", "h3", "h4", "h5", "h6"]);
4044
4045const isSpecial = (/** @type {HtmlElement} */ el) => {
4046 if (el.namespace === NS_HTML) return SPECIAL.has(el.tagName);
4047 if (el.namespace === NS_MATHML) return MATHML_SPECIAL.has(el.tagName);
4048 if (el.namespace === NS_SVG) return SVG_SPECIAL.has(el.tagName.toLowerCase());
4049 return false;
4050};
4051
4052// SVG tag name case adjustments (null prototype: looked up with markup-controlled
4053// names, a plain object would resolve `constructor` etc. to inherited values)

Callers 3

adoptionAgencyFunction · 0.85
anyOtherEndTagFunction · 0.85
startTagInBodyFunction · 0.85

Calls 1

hasMethod · 0.45

Tested by

no test coverage detected