about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/html/performance.nim12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/html/performance.nim b/src/html/performance.nim
index 9bc29a3d..8661654e 100644
--- a/src/html/performance.nim
+++ b/src/html/performance.nim
@@ -5,6 +5,7 @@ import html/event
 import html/script
 import io/timeout
 import monoucha/javascript
+import monoucha/quickjs
 
 type Performance* = ref object of EventTarget
   timeOrigin {.jsget.}: float64
@@ -24,5 +25,16 @@ proc newPerformance*(scripting: ScriptingMode): Performance =
 proc now(performance: Performance): float64 {.jsfunc.} =
   return getTime(performance.scripting) - performance.timeOrigin
 
+proc getEntries(ctx: JSContext; performance: Performance): JSValue {.jsfunc.} =
+  return JS_NewArray(ctx)
+
+proc getEntriesByType(ctx: JSContext; performance: Performance; t: string):
+    JSValue {.jsfunc.} =
+  return JS_NewArray(ctx)
+
+proc getEntriesByName(ctx: JSContext; performance: Performance; name: string;
+    t = none(string)): JSValue {.jsfunc.} =
+  return JS_NewArray(ctx)
+
 proc addPerformanceModule*(ctx: JSContext; eventTargetCID: JSClassID) =
   ctx.registerType(Performance, parent = eventTargetCID)