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

Function _createTrustedScriptURL

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

Source from the content-addressed store, hash-verified

374 };
375
376 const _createTrustedScriptURL = function (scriptUrl: string): string {
377 _assertNotInTrustedTypesPolicy();
378
379 IN_TRUSTED_TYPES_POLICY++;
380 try {
381 return trustedTypesPolicy.createScriptURL(scriptUrl);
382 } finally {
383 IN_TRUSTED_TYPES_POLICY--;
384 }
385 };
386
387 // Resolve the default policy once; neither success nor failure is retried
388 const _getDefaultTrustedTypesPolicy = function () {

Callers 1

Calls 1

Tested by

no test coverage detected