summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorDominik Picheta <dominikpicheta@gmail.com>2016-05-10 12:50:18 +0100
committerDominik Picheta <dominikpicheta@gmail.com>2016-05-10 12:50:18 +0100
commit2e5b19e4790ebd65e4579810b69a5609e4290fac (patch)
tree2afb492a76f478b8a14d36a433356614c5c070d4
parent07b6a32d7abdd18522aeb268364bb2c0594d06c7 (diff)
downloadNim-2e5b19e4790ebd65e4579810b69a5609e4290fac.tar.gz
Added some useful JS procs to DOM module.
-rw-r--r--lib/js/dom.nim5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/js/dom.nim b/lib/js/dom.nim
index 11df959d7..5104712e8 100644
--- a/lib/js/dom.nim
+++ b/lib/js/dom.nim
@@ -402,7 +402,9 @@ proc routeEvent*(w: Window, event: Event)
 proc scrollBy*(w: Window, x, y: int)
 proc scrollTo*(w: Window, x, y: int)
 proc setInterval*(w: Window, code: cstring, pause: int): ref TInterval
+proc setInterval*(w: Window, function: proc (), pause: int): ref TInterval
 proc setTimeout*(w: Window, code: cstring, pause: int): ref TTimeOut
+proc setTimeout*(w: Window, function: proc (), pause: int): ref TInterval
 proc stop*(w: Window)
 
 # Node "methods"
@@ -481,6 +483,9 @@ proc getAttribute*(s: Style, attr: cstring, caseSensitive=false): cstring
 proc removeAttribute*(s: Style, attr: cstring, caseSensitive=false)
 proc setAttribute*(s: Style, attr, value: cstring, caseSensitive=false)
 
+# Event "methods"
+proc preventDefault*(ev: Event)
+
 {.pop.}
 
 var