(/** @type {HtmlElement} */ el)
| 4882 | |
| 4883 | // ---- scopes ---- |
| 4884 | const isScopeBoundary = (/** @type {HtmlElement} */ el) => { |
| 4885 | if (el.namespace === NS_HTML) return HTML_SCOPE.has(el.tagName); |
| 4886 | if (el.namespace === NS_MATHML) return MATHML_SPECIAL.has(el.tagName); |
| 4887 | if (el.namespace === NS_SVG) { |
| 4888 | return SVG_SPECIAL.has(el.tagName.toLowerCase()); |
| 4889 | } |
| 4890 | return false; |
| 4891 | }; |
| 4892 | // Scope "kind" selects which extra elements act as boundaries. Passed as a |
| 4893 | // small int so the scope checks below allocate no per-call predicate closure |
| 4894 | // (these run several times per body tag). |
no test coverage detected