summaryrefslogtreecommitdiff
path: root/ext/web/15_performance.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/web/15_performance.js')
-rw-r--r--ext/web/15_performance.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/ext/web/15_performance.js b/ext/web/15_performance.js
index 41b40159e..07fa2a01d 100644
--- a/ext/web/15_performance.js
+++ b/ext/web/15_performance.js
@@ -24,6 +24,7 @@
const illegalConstructorKey = Symbol("illegalConstructorKey");
const customInspect = SymbolFor("Deno.customInspect");
let performanceEntries = [];
+ let timeOrigin;
webidl.converters["PerformanceMarkOptions"] = webidl
.createDictionaryConverter(
@@ -77,6 +78,10 @@
return webidl.converters.DOMString(V, opts);
};
+ function setTimeOrigin(origin) {
+ timeOrigin = origin;
+ }
+
function findMostRecent(
name,
type,
@@ -327,6 +332,10 @@
webidl.illegalConstructor();
}
+ get timeOrigin() {
+ return timeOrigin;
+ }
+
clearMarks(markName = undefined) {
webidl.assertBranded(this, PerformancePrototype);
if (markName !== undefined) {
@@ -566,5 +575,6 @@
PerformanceMeasure,
Performance,
performance: webidl.createBranded(Performance),
+ setTimeOrigin,
};
})(this);