diff options
author | Geert-Jan Zwiers <geertjanzwiers@protonmail.com> | 2022-05-06 19:37:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-06 19:37:18 +0200 |
commit | dd1d6a0f67cb386941ddc08aa453612f8398144f (patch) | |
tree | 450ebcac29f6c812245939449a08d83e4e5e3e61 /runtime/js/99_main.js | |
parent | 23c77df6643f5b5a8846f67a738fe2e9c1e3c716 (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/99_main.js')
-rw-r--r-- | runtime/js/99_main.js | 3 |
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; |