about summary refs log tree commit diff stats
path: root/src/html/env.nim
diff options
context:
space:
mode:
Diffstat (limited to 'src/html/env.nim')
-rw-r--r--src/html/env.nim7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/html/env.nim b/src/html/env.nim
index 0843c1b6..f48407e3 100644
--- a/src/html/env.nim
+++ b/src/html/env.nim
@@ -10,6 +10,7 @@ import io/promise
 import io/request
 import io/response
 import io/window
+import js/base64
 import js/domexception
 import js/error
 import js/intl
@@ -97,6 +98,12 @@ proc setLocation(window: Window, s: string): Err[JSError]
 proc getWindow(window: Window): Window {.jsuffget: "window".} =
   return window
 
+proc atob(window: Window, data: string): DOMResult[string] {.jsfunc.} =
+  return atob(data)
+
+proc btoa(window: Window, data: string): DOMResult[string] {.jsfunc.} =
+  return btoa(data)
+
 proc addScripting*(window: Window, selector: Selector[int]) =
   let rt = newJSRuntime()
   let ctx = rt.newJSContext()