File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 78
78
// Without the full URL VS Code will try to load file://.
79
79
baseUrl : `${ window . location . origin } ${ options . csStaticBase } /lib/vscode/out` ,
80
80
recordStats : true ,
81
+ // TODO: There don't appear to be any types for trustedTypes yet.
82
+ trustedTypesPolicy : ( window as any ) . trustedTypes ?. createPolicy ( "amdLoader" , {
83
+ createScriptURL ( value : string ) : string {
84
+ if ( value . startsWith ( window . location . origin ) ) {
85
+ return value
86
+ }
87
+ throw new Error ( `Invalid script url: ${ value } ` )
88
+ } ,
89
+ } ) ,
81
90
paths : {
82
91
"vscode-textmate" : `../node_modules/vscode-textmate/release/main` ,
83
92
"vscode-oniguruma" : `../node_modules/vscode-oniguruma/release/main` ,
93
102
}
94
103
} catch ( error ) {
95
104
console . error ( error )
105
+ /* Probably fine. */
96
106
}
97
107
98
108
try {
You can’t perform that action at this time.
0 commit comments