diff options
| author | bptato <nincsnevem662@gmail.com> | 2024-11-09 16:14:53 +0100 |
|---|---|---|
| committer | bptato <nincsnevem662@gmail.com> | 2024-11-09 16:34:26 +0100 |
| commit | 074d86a867c20d6e9daf164e5d03a81cf7ecb2b4 (patch) | |
| tree | 2b398d7ce3d29c4b8165f21249414ce12bfe5a69 /src/html/catom.nim | |
| parent | f6d7c5372b81b9cf7ce76df67b0e61981f96d60f (diff) | |
| download | chawan-074d86a867c20d6e9daf164e5d03a81cf7ecb2b4.tar.gz | |
dom: support all HTMLHyperlinkElementUtils getters
Diffstat (limited to 'src/html/catom.nim')
| -rw-r--r-- | src/html/catom.nim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/html/catom.nim b/src/html/catom.nim index c0263d95..8ac023ab 100644 --- a/src/html/catom.nim +++ b/src/html/catom.nim @@ -47,7 +47,10 @@ macro makeStaticAtom = satFormaction = "formaction" satFormenctype = "formenctype" satFormmethod = "formmethod" + satHash = "hash" satHeight = "height" + satHost = "host" + satHostname = "hostname" satHref = "href" satId = "id" satIntegrity = "integrity" @@ -67,13 +70,19 @@ macro makeStaticAtom = satNovalidate = "novalidate" satOnclick = "onclick" satOnload = "onload" + satOrigin = "origin" + satPassword = "password" + satPathname = "pathname" + satPort = "port" satProgress = "progress" + satProtocol = "protocol" satReadystatechange = "readystatechange" satReferrerpolicy = "referrerpolicy" satRel = "rel" satRequired = "required" satRows = "rows" satRowspan = "rowspan" + satSearch = "search" satSelected = "selected" satSize = "size" satSizes = "sizes" @@ -90,6 +99,7 @@ macro makeStaticAtom = satTouchstart = "touchstart" satType = "type" satUsemap = "usemap" + satUsername = "username" satValign = "valign" satValue = "value" satWheel = "wheel" @@ -220,6 +230,12 @@ proc fromJS*(ctx: JSContext; val: JSAtom; res: var CAtom): Opt[void] = res = ctx.getFactoryImpl().toAtom(s) return ok() +proc fromJS*(ctx: JSContext; val: JSAtom; res: var StaticAtom): Opt[void] = + var ca: CAtom + ?ctx.fromJS(val, ca) + res = ctx.getFactoryImpl().toStaticAtom(ca) + return ok() + proc toJS*(ctx: JSContext; atom: CAtom): JSValue = return ctx.toJS(ctx.getFactoryImpl().toStr(atom)) |