summaryrefslogtreecommitdiff
path: root/dom/webidl
diff options
context:
space:
mode:
authorFranklinDM <mrmineshafter17@gmail.com>2023-04-06 19:32:32 +0800
committerFranklinDM <mrmineshafter17@gmail.com>2023-04-10 18:22:53 +0800
commit19a7544fdf5f151bdd7a5307258f5aae16c8ee0c (patch)
tree559d5695432fd9f85cd72222a3016b77103f5389 /dom/webidl
parentd4138780ee267baf56250bb3a592419202553385 (diff)
downloaduxp-19a7544fdf5f151bdd7a5307258f5aae16c8ee0c.tar.gz
Issue #2053 - Part 3: Update PerformanceMark to User Timing L3
There are a few minor differences between this and Mozilla's implementation: (a) The type error messages were not hardcoded to the Performance class and were moved to Errors.msg or domerr.msg instead. (b) Resist fingerprinting-pref changes were skipped. Partially based on https://bugzilla.mozilla.org/show_bug.cgi?id=1724645
Diffstat (limited to 'dom/webidl')
-rw-r--r--dom/webidl/Performance.webidl8
-rw-r--r--dom/webidl/PerformanceMark.webidl3
2 files changed, 9 insertions, 2 deletions
diff --git a/dom/webidl/Performance.webidl b/dom/webidl/Performance.webidl
index e681505216..7cd6c67172 100644
--- a/dom/webidl/Performance.webidl
+++ b/dom/webidl/Performance.webidl
@@ -72,11 +72,17 @@ partial interface Performance {
};
#endif
+// https://w3c.github.io/user-timing/#extensions-performance-interface
+dictionary PerformanceMarkOptions {
+ any detail;
+ DOMHighResTimeStamp startTime;
+};
+
// http://www.w3.org/TR/user-timing/
[Exposed=(Window,Worker)]
partial interface Performance {
[Func="Performance::IsEnabled", Throws]
- void mark(DOMString markName);
+ PerformanceMark mark(DOMString markName, optional PerformanceMarkOptions markOptions);
[Func="Performance::IsEnabled"]
void clearMarks(optional DOMString markName);
[Func="Performance::IsEnabled", Throws]
diff --git a/dom/webidl/PerformanceMark.webidl b/dom/webidl/PerformanceMark.webidl
index 20e9e92c02..2ef9fcd844 100644
--- a/dom/webidl/PerformanceMark.webidl
+++ b/dom/webidl/PerformanceMark.webidl
@@ -7,7 +7,8 @@
* http://www.w3.org/TR/user-timing/#performancemark
*/
-[Exposed=(Window,Worker)]
+[Exposed=(Window,Worker), Constructor(DOMString markName, optional PerformanceMarkOptions markOptions)]
interface PerformanceMark : PerformanceEntry
{
+ readonly attribute any detail;
};