(
/** @type {string} */ tagName,
/** @type {number} */ kind
)
| 4910 | // "have an element in scope": walk the open stack from the top until the |
| 4911 | // named HTML element is found (true) or a scope boundary is hit (false). |
| 4912 | const hasNameInScope = ( |
| 4913 | /** @type {string} */ tagName, |
| 4914 | /** @type {number} */ kind |
| 4915 | ) => { |
| 4916 | for (let i = open.length - 1; i >= 0; i--) { |
| 4917 | const el = open[i]; |
| 4918 | if (el.namespace === NS_HTML && el.tagName === tagName) return true; |
| 4919 | if (isBoundaryForKind(el, kind)) return false; |
| 4920 | } |
| 4921 | return false; |
| 4922 | }; |
| 4923 | const inScope = (/** @type {string} */ tagName) => |
| 4924 | hasNameInScope(tagName, SCOPE_DEFAULT); |
| 4925 | const inButtonScope = (/** @type {string} */ tagName) => |
no test coverage detected