diff options
author | bptato <nincsnevem662@gmail.com> | 2023-07-02 23:41:02 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-07-02 23:41:11 +0200 |
commit | 3c5aa0645bcc1d2481cdb4b03001afd96fd318e0 (patch) | |
tree | f1ba22a1d7d93a6db28e60e56e04602d023e5f41 /src/js/javascript.nim | |
parent | 31cca81850bfe43771767dbffc2879a5061b84cd (diff) | |
download | chawan-3c5aa0645bcc1d2481cdb4b03001afd96fd318e0.tar.gz |
Add XHR/Event stubs
Diffstat (limited to 'src/js/javascript.nim')
-rw-r--r-- | src/js/javascript.nim | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/js/javascript.nim b/src/js/javascript.nim index 02d22903..ac8069b7 100644 --- a/src/js/javascript.nim +++ b/src/js/javascript.nim @@ -1724,6 +1724,8 @@ template jsget*() {.pragma.} template jsget*(name: string) {.pragma.} template jsset*() {.pragma.} template jsset*(name: string) {.pragma.} +template jsgetset*() {.pragma.} +template jsgetset*(name: string) {.pragma.} proc js_illegal_ctor*(ctx: JSContext, this: JSValue, argc: cint, argv: ptr JSValue): JSValue {.cdecl.} = return JS_ThrowTypeError(ctx, "Illegal constructor") @@ -1787,6 +1789,9 @@ proc findPragmas(t: NimNode): JSObjectPragmas = case pragmaName of "jsget": result.jsget.add(op) of "jsset": result.jsset.add(op) + of "jsgetset": + result.jsget.add(op) + result.jsset.add(op) of "jsinclude": result.jsinclude.add(op) proc nim_finalize_for_js*[T](obj: ptr T) = |