[nav_timing] client-side timing as an extension

This commit is contained in:
Shish
2024-01-12 12:37:33 +00:00
parent f210716bf5
commit 8308a21cb1
2 changed files with 22 additions and 0 deletions

6
ext/nav_timing/init.js Normal file
View File

@@ -0,0 +1,6 @@
const observer = new PerformanceObserver((list) => {
list.getEntries().forEach((entry) => {
shm_log("timing", {"v": 2, ...entry.toJSON()});
});
});
observer.observe({ entryTypes: ["navigation"] });