MCPcopy
hub / github.com/hoothin/UserScripts / isTrustedTypesEnforced

Function isTrustedTypesEnforced

Picviewer CE+/dist.user.js:12731–12738  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12729 }
12730
12731 function isTrustedTypesEnforced() {
12732 try {
12733 document.createElement('div').innerHTML = '';
12734 return false;
12735 } catch (e) {
12736 return true;
12737 }
12738 }
12739
12740 async function createPolicy() {
12741 if (!(unsafeWindow.trustedTypes && unsafeWindow.trustedTypes.createPolicy && isTrustedTypesEnforced())) {

Callers 1

createPolicyFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected