about summary refs log tree commit diff stats
path: root/src/html/catom.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-11-09 21:26:50 +0100
committerbptato <nincsnevem662@gmail.com>2024-11-09 21:33:51 +0100
commitfc94d4af9617a96ddee4c859a56bae8bc4ba1d49 (patch)
treed7bb2a05ab6dbe39b3d2d38e263996879341f1cc /src/html/catom.nim
parent2bd7abf0c676a14e87dc713b33f77ee2c48f60ab (diff)
downloadchawan-fc94d4af9617a96ddee4c859a56bae8bc4ba1d49.tar.gz
dom: misc fixes & additions
* fix cloneNode not cloning id/name atoms
* fix HTMLOptionsCollection named item getter
* fix HTMLCollection named item getter not refreshing snapshot
* support named item getter for form
* add basic createEvent
Diffstat (limited to 'src/html/catom.nim')
-rw-r--r--src/html/catom.nim6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/html/catom.nim b/src/html/catom.nim
index 046b37dc..4a0b4f65 100644
--- a/src/html/catom.nim
+++ b/src/html/catom.nim
@@ -43,6 +43,7 @@ macro makeStaticAtom =
       satEnctype = "enctype"
       satError = "error"
       satEvent = "event"
+      satEvents = "events"
       satFor = "for"
       satForm = "form"
       satFormaction = "formaction"
@@ -92,6 +93,7 @@ macro makeStaticAtom =
       satSrcset = "srcset"
       satStyle = "style"
       satStylesheet = "stylesheet"
+      satSvgevents = "svgevents"
       satTarget = "target"
       satText = "text"
       satTimeout = "timeout"
@@ -99,6 +101,7 @@ macro makeStaticAtom =
       satTouchmove = "touchmove"
       satTouchstart = "touchstart"
       satType = "type"
+      satUEvent = "Event"
       satUsemap = "usemap"
       satUsername = "username"
       satValign = "valign"
@@ -216,6 +219,9 @@ var getFactoryImpl*: proc(ctx: JSContext): CAtomFactory {.nimcall, noSideEffect,
 proc toAtom*(ctx: JSContext; atom: StaticAtom): CAtom =
   return ctx.getFactoryImpl().toAtom(atom)
 
+proc toAtom*(ctx: JSContext; s: string): CAtom =
+  return ctx.getFactoryImpl().toAtom(s)
+
 proc toStaticAtom*(ctx: JSContext; atom: CAtom): StaticAtom =
   return ctx.getFactoryImpl().toStaticAtom(atom)