diff options
author | bptato <nincsnevem662@gmail.com> | 2024-11-09 21:26:50 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-11-09 21:33:51 +0100 |
commit | fc94d4af9617a96ddee4c859a56bae8bc4ba1d49 (patch) | |
tree | d7bb2a05ab6dbe39b3d2d38e263996879341f1cc /src/html/catom.nim | |
parent | 2bd7abf0c676a14e87dc713b33f77ee2c48f60ab (diff) | |
download | chawan-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.nim | 6 |
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) |