From dd1d6a0f67cb386941ddc08aa453612f8398144f Mon Sep 17 00:00:00 2001 From: Geert-Jan Zwiers Date: Fri, 6 May 2022 19:37:18 +0200 Subject: feat(web): add `performance.timeOrigin` (#14489) Add support for the `performance.timeOrigin` web API. Co-authored-by: Jovi De Croock --- runtime/js/99_main.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'runtime') 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; -- cgit v1.2.3