From 1dd157da7f304222ab6918d78e830ae9c5f6f728 Mon Sep 17 00:00:00 2001 From: bptato Date: Sat, 27 Jul 2024 19:37:25 +0200 Subject: env: add alert shim just call console.error for now --- src/html/env.nim | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/html') diff --git a/src/html/env.nim b/src/html/env.nim index 6f994369..377c2fbf 100644 --- a/src/html/env.nim +++ b/src/html/env.nim @@ -170,6 +170,9 @@ proc btoa(ctx: JSContext; window: Window; data: JSValue): DOMResult[string] {.jsfunc.} = return btoa(ctx, data) +proc alert(window: Window; s: string) {.jsfunc.} = + window.console.error(s) + proc getComputedStyle(window: Window; element: Element; pseudoElt = none(Element)): JSResult[CSSStyleDeclaration] {.jsfunc.} = #TODO implement this properly -- cgit 1.4.1-2-gfad0