()
| 250 | // the same unbounded recursion. |
| 251 | let IN_TRUSTED_TYPES_POLICY = 0; |
| 252 | const _assertNotInTrustedTypesPolicy = function (): void { |
| 253 | if (IN_TRUSTED_TYPES_POLICY > 0) { |
| 254 | throw typeErrorCreate( |
| 255 | 'A configured TRUSTED_TYPES_POLICY callback (createHTML or ' + |
| 256 | 'createScriptURL) must not call DOMPurify.sanitize, as that causes ' + |
| 257 | 'infinite recursion. Do not pass a policy whose callbacks wrap ' + |
| 258 | 'DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted ' + |
| 259 | 'Types" section of the README.' |
| 260 | ); |
| 261 | } |
| 262 | }; |
| 263 | |
| 264 | const _createTrustedHTML = function (html: string): string { |
| 265 | _assertNotInTrustedTypesPolicy(); |
no outgoing calls
no test coverage detected