diff options
Diffstat (limited to 'js/globals.ts')
-rw-r--r-- | js/globals.ts | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/js/globals.ts b/js/globals.ts index cca72d172..81e6bdf12 100644 --- a/js/globals.ts +++ b/js/globals.ts @@ -1,6 +1,5 @@ // Copyright 2018 Ryan Dahl <ry@tinyclouds.org> // All rights reserved. MIT License. -import * as timer from "./timers"; // If you use the eval function indirectly, by invoking it via a reference // other than eval, as of ECMAScript 5 it works in the global scope rather than @@ -11,22 +10,23 @@ export const globalEval = eval; // A reference to the global object. // TODO The underscore is because it's conflicting with @types/node. -export const _global = globalEval("this"); +export const window = globalEval("this"); -_global["window"] = _global; // Create a window object. -import "./url"; +window["window"] = window; // Create a window object. +// import "./url"; -_global["setTimeout"] = timer.setTimeout; -_global["setInterval"] = timer.setInterval; -_global["clearTimeout"] = timer.clearTimer; -_global["clearInterval"] = timer.clearTimer; +// import * as timer from "./timers"; +// window["setTimeout"] = timer.setTimeout; +// window["setInterval"] = timer.setInterval; +// window["clearTimeout"] = timer.clearTimer; +// window["clearInterval"] = timer.clearTimer; import { Console } from "./console"; -_global["console"] = new Console(); +window["console"] = new Console(); -import { fetch } from "./fetch"; -_global["fetch"] = fetch; +// import { fetch } from "./fetch"; +// window["fetch"] = fetch; -import { TextEncoder, TextDecoder } from "text-encoding"; -_global["TextEncoder"] = TextEncoder; -_global["TextDecoder"] = TextDecoder; +// import { TextEncoder, TextDecoder } from "text-encoding"; +// window["TextEncoder"] = TextEncoder; +// window["TextDecoder"] = TextDecoder; |