diff options
author | bptato <nincsnevem662@gmail.com> | 2025-02-20 18:35:44 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2025-02-20 18:35:44 +0100 |
commit | 10e291490843770c3818da97c34cc148acca8c5a (patch) | |
tree | c6c10ca415e742120d0ff77fd85905f4e890802f /src | |
parent | d8572decccea198c614bf220087a564dd4ec89f2 (diff) | |
download | chawan-10e291490843770c3818da97c34cc148acca8c5a.tar.gz |
performance: stub getEntries*
Diffstat (limited to 'src')
-rw-r--r-- | src/html/performance.nim | 12 |
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) |