You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Simplify _scriptName / scriptDirectory handling. NFC (#24023)
- Avoid defining `_scriptName` outside the wrapper function in
`EXPORT_ES6` mode and for Node.js CommonJS builds.
- Simplify `scriptDirectory` resolution to `new URL('.',
_scriptName).href` on the web.
- Add tests to verify that `scriptDirectory` is an absolute path across
different build configurations.
// In MODULARIZE mode _scriptName needs to be captured already at the very top of the page immediately when the page is parsed, so it is generated there
144
148
// before the page load. In non-MODULARIZE modes generate it here.
Copy file name to clipboardExpand all lines: src/shell_minimal.js
+4-2
Original file line number
Diff line number
Diff line change
@@ -134,7 +134,7 @@ var ENVIRONMENT_IS_PTHREAD = ENVIRONMENT_IS_WORKER && self.name?.startsWith('em-
134
134
#if !MODULARIZE
135
135
// In MODULARIZE mode _scriptName needs to be captured already at the very top of the page immediately when the page is parsed, so it is generated there
136
136
// before the page load. In non-MODULARIZE modes generate it here.
0 commit comments