summary refs log tree commit diff stats
path: root/lib/js
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2019-02-08 12:18:31 +0100
committerAraq <rumpf_a@web.de>2019-02-08 12:18:42 +0100
commit8bc7c50c86102864016c7d1b3441949a74dea012 (patch)
tree485c18531719181012023be5a5adc2b3cae3863e /lib/js
parent4ed7507cb2320aecbe10c753ee9b80e81b87211d (diff)
downloadNim-8bc7c50c86102864016c7d1b3441949a74dea012.tar.gz
DOM module: re-add more missing stuff
Diffstat (limited to 'lib/js')
-rw-r--r--lib/js/dom.nim37
1 files changed, 36 insertions, 1 deletions
diff --git a/lib/js/dom.nim b/lib/js/dom.nim
index 79bbe76fc..9d6cd9152 100644
--- a/lib/js/dom.nim
+++ b/lib/js/dom.nim
@@ -72,6 +72,37 @@ type
     Unload = "unload",
     Wheel = "wheel"
 
+  PerformanceMemory* {.importc.} = ref object
+    jsHeapSizeLimit*: float
+    totalJSHeapSize*: float
+    usedJSHeapSize*: float
+
+  PerformanceTiming* {.importc.} = ref object
+    connectStart*: float
+    domComplete*: float
+    domContentLoadedEventEnd*: float
+    domContentLoadedEventStart*: float
+    domInteractive*: float
+    domLoading*: float
+    domainLookupEnd*: float
+    domainLookupStart*: float
+    fetchStart*: float
+    loadEventEnd*: float
+    loadEventStart*: float
+    navigationStart*: float
+    redirectEnd*: float
+    redirectStart*: float
+    requestStart*: float
+    responseEnd*: float
+    responseStart*: float
+    secureConnectionStart*: float
+    unloadEventEnd*: float
+    unloadEventStart*: float
+
+  Performance* {.importc.} = ref object
+    memory*: PerformanceMemory
+    timing*: PerformanceTiming
+
   Window* = ref WindowObj
   WindowObj {.importc.} = object of EventTargetObj
     document*: Document
@@ -80,12 +111,15 @@ type
     location*: Location
     closed*: bool
     defaultStatus*: cstring
+    devicePixelRatio*: float
     innerHeight*, innerWidth*: int
     locationbar*: ref LocationBar
     menubar*: ref MenuBar
     name*: cstring
     outerHeight*, outerWidth*: int
     pageXOffset*, pageYOffset*: int
+    scrollX*: float
+    scrollY*: float
     personalbar*: ref PersonalBar
     scrollbars*: ref ScrollBars
     statusbar*: ref StatusBar
@@ -93,6 +127,8 @@ type
     toolbar*: ref ToolBar
     frames*: seq[Frame]
     screen*: Screen
+    performance*: Performance
+    onpopstate*: proc (event: Event)
 
   Frame* = ref FrameObj
   FrameObj {.importc.} = object of WindowObj
@@ -1075,7 +1111,6 @@ proc setTimeout*(w: Window, function: proc (), pause: int): ref Interval
 proc stop*(w: Window)
 proc requestAnimationFrame*(w: Window, function: proc (time: float)): int
 proc cancelAnimationFrame*(w: Window, id: int)
-proc onpopstate*(w: Window, ev: Event)
 
 # Node "methods"
 proc appendData*(n: Node, data: cstring)