summary refs log tree commit diff stats
path: root/lib/pure/htmlgen.nim
diff options
context:
space:
mode:
authorNathan Cahill <nathan@nathancahill.com>2018-08-26 12:11:43 -0700
committerDominik Picheta <dominikpicheta@googlemail.com>2018-08-26 21:48:37 +0100
commit238809f50686f63206210e6e923c59243914b1e3 (patch)
tree18416f30ae668b22a9f2732449527efb00ee2571 /lib/pure/htmlgen.nim
parent50aa376e802d949f430eba64ecd9f6beb86f91df (diff)
downloadNim-238809f50686f63206210e6e923c59243914b1e3.tar.gz
Update html attrs to current html spec
Diffstat (limited to 'lib/pure/htmlgen.nim')
-rw-r--r--lib/pure/htmlgen.nim16
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/pure/htmlgen.nim b/lib/pure/htmlgen.nim
index 55b02ea60..ea3a0a3f0 100644
--- a/lib/pure/htmlgen.nim
+++ b/lib/pure/htmlgen.nim
@@ -31,10 +31,18 @@ import
   macros, strutils
 
 const
-  coreAttr* = " id class title style "
-  eventAttr* = " onclick ondblclick onmousedown onmouseup " &
-    "onmouseover onmousemove onmouseout onkeypress onkeydown onkeyup onload "
-  commonAttr* = coreAttr & eventAttr
+  coreAttr* = " accesskey class contenteditable dir hidden id lang " &
+    "spellcheck style tabindex title translate "
+  eventAttr* = "onabort onblur oncancel oncanplay oncanplaythrough onchange " &
+    "onclick oncuechange ondblclick ondurationchange onemptied onended " &
+    "onerror onfocus oninput oninvalid onkeydown onkeypress onkeyup onload " &
+    "onloadeddata onloadedmetadata onloadstart onmousedown onmouseenter " &
+    "onmouseleave onmousemove onmouseout onmouseover onmouseup onmousewheel " &
+    "onpause onplay onplaying onprogress onratechange onreset onresize " &
+    "onscroll onseeked onseeking onselect onshow onstalled onsubmit " &
+    "onsuspend ontimeupdate ontoggle onvolumechange onwaiting "
+  ariaAttr* = " role "
+  commonAttr* = coreAttr & eventAttr & ariaAttr
 
 proc getIdent(e: NimNode): string {.compileTime.} =
   case e.kind