[nwd] Fixed the trustedTypes variable identification bug There is a small bug with the the "trustedTypes" variable which is not found as I was missing the "self." statement in index.js. Change-Id: Id6976aed52943c8435857e46c62719fe54ef73f3
diff --git a/index.js b/index.js index ed5bb1d..ae9515f 100644 --- a/index.js +++ b/index.js
@@ -7,10 +7,10 @@ var getProto = Object.getPrototypeOf; class TrustedFunction { - static policy = trustedTypes.createPolicy('TrustedFunctionWorkaround', { + static policy = self.trustedTypes.createPolicy('TrustedFunctionWorkaround', { createScript: (_, ...args) => { args.forEach( (arg) => { - if (!trustedTypes.isScript(arg)) { + if (!self.trustedTypes.isScript(arg)) { throw new Error("TrustedScripts only, please"); } });