MCPcopy
hub / github.com/webpack/webpack / htmlIntegrationPoint

Function htmlIntegrationPoint

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

Source from the content-addressed store, hash-verified

5221 const mathmlTextIntegrationPoint = (/** @type {HtmlElement} */ el) =>
5222 el.namespace === NS_MATHML && MATHML_TEXT_INTEGRATION.has(el.tagName);
5223 const htmlIntegrationPoint = (/** @type {HtmlElement} */ el) => {
5224 if (el.namespace === NS_MATHML && el.tagName === "annotation-xml") {
5225 const enc = findAttr(el.attributes, "encoding");
5226 if (
5227 enc &&
5228 (enc.value.toLowerCase() === "text/html" ||
5229 enc.value.toLowerCase() === "application/xhtml+xml")
5230 ) {
5231 return true;
5232 }
5233 return false;
5234 }
5235 if (el.namespace === NS_SVG && SVG_SPECIAL.has(el.tagName.toLowerCase())) {
5236 return true;
5237 }
5238 return false;
5239 };
5240
5241 const adjustSvgTag = (/** @type {string} */ name) =>
5242 /** @type {Record<string, string>} */ (SVG_TAG_ADJUST)[name] || name;

Callers 2

shouldUseForeignRulesFunction · 0.85
foreignContentFunction · 0.85

Calls 2

findAttrFunction · 0.85
hasMethod · 0.45

Tested by

no test coverage detected