@@ -93,7 +93,6 @@ export function getNlsConfiguration(_document: Document, base: string) {
93
93
}
94
94
95
95
type GetLoaderParams = {
96
- origin : string
97
96
nlsConfig : NlsConfiguration
98
97
options : Options
99
98
_window : Window
@@ -136,14 +135,14 @@ export function _createScriptURL(value: string, origin: string): string {
136
135
* We extracted the logic into a function so that
137
136
* it's easier to test.
138
137
**/
139
- export function getConfigurationForLoader ( { origin , nlsConfig, options, _window } : GetLoaderParams ) {
138
+ export function getConfigurationForLoader ( { nlsConfig, options, _window } : GetLoaderParams ) {
140
139
const loader : Loader = {
141
140
// Without the full URL VS Code will try to load file://.
142
- baseUrl : `${ origin } ${ options . csStaticBase } /lib/vscode/out` ,
141
+ baseUrl : `${ window . location . origin } ${ options . csStaticBase } /lib/vscode/out` ,
143
142
recordStats : true ,
144
143
trustedTypesPolicy : ( _window as FixMeLater ) . trustedTypes ?. createPolicy ( "amdLoader" , {
145
144
createScriptURL ( value : string ) : string {
146
- return _createScriptURL ( value , origin )
145
+ return _createScriptURL ( value , window . location . origin )
147
146
} ,
148
147
} ) ,
149
148
paths : {
@@ -239,7 +238,6 @@ export function main(_document: Document | undefined, _window: Window | undefine
239
238
nlsConfig,
240
239
options,
241
240
_window,
242
- origin : _window . location . origin ,
243
241
} )
244
242
245
243
; ( self . require as unknown as Loader ) = loader
0 commit comments