summaryrefslogtreecommitdiff
path: root/runtime/js
diff options
context:
space:
mode:
authorGeert-Jan Zwiers <geertjanzwiers@protonmail.com>2022-05-06 19:37:18 +0200
committerGitHub <noreply@github.com>2022-05-06 19:37:18 +0200
commitdd1d6a0f67cb386941ddc08aa453612f8398144f (patch)
tree450ebcac29f6c812245939449a08d83e4e5e3e61 /runtime/js
parent23c77df6643f5b5a8846f67a738fe2e9c1e3c716 (diff)
feat(web): add `performance.timeOrigin` (#14489)
Add support for the `performance.timeOrigin` web API. Co-authored-by: Jovi De Croock <decroockjovi@gmail.com>
Diffstat (limited to 'runtime/js')
-rw-r--r--runtime/js/99_main.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js
index 07a350424..d83a2e6c8 100644
--- a/runtime/js/99_main.js
+++ b/runtime/js/99_main.js
@@ -9,6 +9,7 @@ delete Object.prototype.__proto__;
const core = Deno.core;
const {
ArrayPrototypeMap,
+ DateNow,
Error,
FunctionPrototypeCall,
FunctionPrototypeBind,
@@ -530,6 +531,7 @@ delete Object.prototype.__proto__;
throw new Error("Worker runtime already bootstrapped");
}
+ performance.setTimeOrigin(DateNow());
const consoleFromV8 = window.console;
const wrapConsole = window.__bootstrap.console.wrapConsole;
@@ -622,6 +624,7 @@ delete Object.prototype.__proto__;
throw new Error("Worker runtime already bootstrapped");
}
+ performance.setTimeOrigin(DateNow());
const consoleFromV8 = window.console;
const wrapConsole = window.__bootstrap.console.wrapConsole;