summaryrefslogtreecommitdiff
path: root/internal/ui/static/js/tt.js
blob: f42cc47a8ed8d9c61822ad6c32bd2ea734e01da9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
let ttpolicy;
if (window.trustedTypes && trustedTypes.createPolicy) {
    //TODO: use an allow-list for `createScriptURL`
    if (!ttpolicy) {
        ttpolicy = trustedTypes.createPolicy('ttpolicy', {
            createScriptURL: src => src,
            createHTML: html => html,
        });
    }
} else {
    ttpolicy = {
        createScriptURL: src => src,
        createHTML: html => html,
    };
}