diff options
author | Kevin (Kun) "Kassimo" Qian <kevinkassimo@gmail.com> | 2018-09-20 15:53:29 -0700 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2018-09-20 18:53:29 -0400 |
commit | 4d16d54ff85d84723b8493e6a47caf70becc6660 (patch) | |
tree | 3eff7fdb9c77717e2930a548db374e40f7547279 /js/globals.ts | |
parent | 52d415537b6b9f6be115dca4daee3f3a36be0ce9 (diff) |
Add atob() and btoa() (#776)
Diffstat (limited to 'js/globals.ts')
-rw-r--r-- | js/globals.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/js/globals.ts b/js/globals.ts index 912af7dc4..3e40db06c 100644 --- a/js/globals.ts +++ b/js/globals.ts @@ -25,6 +25,8 @@ declare global { TextEncoder: typeof TextEncoder; TextDecoder: typeof TextDecoder; + atob: typeof atob; + btoa: typeof btoa; Headers: typeof Headers; Blob: typeof Blob; @@ -43,6 +45,8 @@ declare global { // tslint:disable:variable-name const TextEncoder: typeof textEncoding.TextEncoder; const TextDecoder: typeof textEncoding.TextDecoder; + const atob: typeof textEncoding.atob; + const btoa: typeof textEncoding.btoa; const Headers: typeof DenoHeaders; const Blob: typeof DenoBlob; // tslint:enable:variable-name @@ -62,6 +66,8 @@ window.clearInterval = timers.clearTimer; window.console = new Console(libdeno.print); window.TextEncoder = textEncoding.TextEncoder; window.TextDecoder = textEncoding.TextDecoder; +window.atob = textEncoding.atob; +window.btoa = textEncoding.btoa; window.fetch = fetch_.fetch; |