MCPcopy Create free account
hub / github.com/cure53/DOMPurify / _isBasicCustomElement

Function _isBasicCustomElement

src/purify.ts:2280–2285  ·  view source on GitHub ↗
(tagName: string)

Source from the content-addressed store, hash-verified

2278 * @returns Returns true if the tag name meets the basic criteria for a custom element, otherwise false.
2279 */
2280 const _isBasicCustomElement = function (tagName: string): boolean {
2281 return (
2282 !RESERVED_CUSTOM_ELEMENT_NAMES[stringToLowerCase(tagName)] &&
2283 regExpTest(CUSTOM_ELEMENT, tagName)
2284 );
2285 };
2286
2287 /**
2288 * Wrap an attribute value in the matching Trusted Types object when

Callers 2

_sanitizeDisallowedNodeFunction · 0.85
_isValidAttributeFunction · 0.85

Calls 1

regExpTestFunction · 0.85

Tested by

no test coverage detected