summaryrefslogtreecommitdiff
path: root/runtime/js/99_main.js
diff options
context:
space:
mode:
authorDivy Srivastava <dj.srivastava23@gmail.com>2024-02-15 10:20:17 +0530
committerGitHub <noreply@github.com>2024-02-15 04:50:17 +0000
commitb72f0be27c382f2d4e5d272ce9ed2211af584d80 (patch)
tree6b896e59f63cbe0f49d47f58832d5c3440e6ef03 /runtime/js/99_main.js
parent1ad754b4123009e01dbecb3b880e7f0545e46c2f (diff)
chore: add DENO_FUTURE env var (#22318)
Closes https://github.com/denoland/deno/issues/22315 ``` ~> DENO_FUTURE=1 target/debug/deno > globalThis.window undefined ```
Diffstat (limited to 'runtime/js/99_main.js')
-rw-r--r--runtime/js/99_main.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js
index 965af460d..11c26798b 100644
--- a/runtime/js/99_main.js
+++ b/runtime/js/99_main.js
@@ -647,6 +647,7 @@ function bootstrapMainRuntime(runtimeOptions) {
6: maybeBinaryNpmCommandName,
7: shouldDisableDeprecatedApiWarning,
8: shouldUseVerboseDeprecatedApiWarning,
+ 9: future,
} = runtimeOptions;
removeImportedOps();
@@ -769,6 +770,10 @@ function bootstrapMainRuntime(runtimeOptions) {
if (nodeBootstrap) {
nodeBootstrap(hasNodeModulesDir, maybeBinaryNpmCommandName);
}
+
+ if (future) {
+ delete globalThis.window;
+ }
}
function bootstrapWorkerRuntime(