diff options
author | bptato <nincsnevem662@gmail.com> | 2024-07-27 19:37:25 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-07-27 19:37:25 +0200 |
commit | 1dd157da7f304222ab6918d78e830ae9c5f6f728 (patch) | |
tree | d04bc5fc3972e4db528addac342dd626d2e03397 | |
parent | 497337cb07474b11fd64ca03009024a59774ce11 (diff) | |
download | chawan-1dd157da7f304222ab6918d78e830ae9c5f6f728.tar.gz |
env: add alert shim
just call console.error for now
-rw-r--r-- | src/html/env.nim | 3 |
1 files changed, 3 insertions, 0 deletions
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 |