MCPcopy
hub / github.com/webpack/webpack / inScopeEl

Function inScopeEl

lib/html/syntax.js:4929–4936  ·  view source on GitHub ↗
(/** @type {HtmlElement} */ target)

Source from the content-addressed store, hash-verified

4927 const inListItemScope = (/** @type {string} */ tagName) =>
4928 hasNameInScope(tagName, SCOPE_LIST_ITEM);
4929 const inScopeEl = (/** @type {HtmlElement} */ target) => {
4930 for (let i = open.length - 1; i >= 0; i--) {
4931 const el = open[i];
4932 if (el === target) return true;
4933 if (isScopeBoundary(el)) return false;
4934 }
4935 return false;
4936 };
4937 // `target` is a single tag name (the common case) or a Set of names.
4938 const inTableScope = (/** @type {string | Set<string>} */ target) => {
4939 const set = typeof target === "string" ? null : target;

Callers 2

adoptionAgencyFunction · 0.85
endTagInBodyFunction · 0.85

Calls 1

isScopeBoundaryFunction · 0.85

Tested by

no test coverage detected