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

Function _createTrustedScriptURL

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

Source from the content-addressed store, hash-verified

331 };
332
333 const _createTrustedScriptURL = function (scriptUrl: string): string {
334 _assertNotInTrustedTypesPolicy();
335
336 IN_TRUSTED_TYPES_POLICY++;
337 try {
338 return trustedTypesPolicy.createScriptURL(scriptUrl);
339 } finally {
340 IN_TRUSTED_TYPES_POLICY--;
341 }
342 };
343
344 // Resolve the default policy once; neither success nor failure is retried
345 const _getDefaultTrustedTypesPolicy = function () {

Callers 1

Calls 1

Tested by

no test coverage detected