diff options
| author | Parsa Ghadimi <me@qti3e.com> | 2018-05-23 23:23:41 +0430 |
|---|---|---|
| committer | Ryan Dahl <ry@tinyclouds.org> | 2018-05-23 17:07:20 -0400 |
| commit | cb222ceb227f5a7f5307085bcbebfa3cdb049598 (patch) | |
| tree | 312f3a1c46af2c668d68881ea62f56ac27d99b9d /globals.ts | |
| parent | 3171ba4c3ff4046aaca0d70321f1dfec4c0728bb (diff) | |
Adds setInterval, clearInterval, clearTimeout.
Diffstat (limited to 'globals.ts')
| -rw-r--r-- | globals.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/globals.ts b/globals.ts index f25cc710b..d38fbf47d 100644 --- a/globals.ts +++ b/globals.ts @@ -1,4 +1,4 @@ -import { setTimeout } from "./timers"; +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 @@ -14,7 +14,10 @@ export const _global = globalEval("this"); _global["window"] = _global; // Create a window object. import "./url"; -_global["setTimeout"] = setTimeout; +_global["setTimeout"] = timer.setTimeout; +_global["setInterval"] = timer.setInterval; +_global["clearTimeout"] = timer.clearTimer; +_global["clearInterval"] = timer.clearTimer; const print = V8Worker2.print; |
