File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -13,8 +13,9 @@ interface CSPTrustedTypesPolicy {
1313 createHTML : ( s : string , response : Response ) => CSPTrustedHTMLToStringable
1414}
1515let cspTrustedTypesPolicyPromise : Promise < CSPTrustedTypesPolicy > | null = null
16- export function setCSPTrustedTypesPolicy ( policy : CSPTrustedTypesPolicy | Promise < CSPTrustedTypesPolicy > ) : void {
17- cspTrustedTypesPolicyPromise = Promise . resolve ( policy )
16+ // Passing `null` clears the policy.
17+ export function setCSPTrustedTypesPolicy ( policy : CSPTrustedTypesPolicy | Promise < CSPTrustedTypesPolicy > | null ) : void {
18+ cspTrustedTypesPolicyPromise = policy === null ? policy : Promise . resolve ( policy )
1819}
1920
2021export default class IncludeFragmentElement extends HTMLElement {
You can’t perform that action at this time.
0 commit comments