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

Function _createTrustedScriptURL

src/purify.ts:351–360  ·  view source on GitHub ↗
(scriptUrl: string)

Source from the content-addressed store, hash-verified

349 };
350
351 const _createTrustedScriptURL = function (scriptUrl: string): string {
352 _assertNotInTrustedTypesPolicy();
353
354 IN_TRUSTED_TYPES_POLICY++;
355 try {
356 return trustedTypesPolicy.createScriptURL(scriptUrl);
357 } finally {
358 IN_TRUSTED_TYPES_POLICY--;
359 }
360 };
361
362 // Lazily resolve (and cache) the instance's internal default policy.
363 // Resolution is attempted at most once: a successful `createPolicy` cannot be

Callers 1

Calls 1

Tested by

no test coverage detected