From d55bb49781bf428ca9cd0be8735eb95631440bdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Naz=C4=B1m=20Can=20Alt=C4=B1nova?= Date: Thu, 15 May 2025 23:01:41 +0300 Subject: [PATCH] Add toJSON to PerformancePaintTiming --- index.bs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/index.bs b/index.bs index 5a71a39..da01037 100644 --- a/index.bs +++ b/index.bs @@ -223,7 +223,9 @@ The {{PerformancePaintTiming}} interface {#sec-PerformancePaintTiming}
     [Exposed=Window]
-    interface PerformancePaintTiming : PerformanceEntry {};
+    interface PerformancePaintTiming : PerformanceEntry {
+        [Default] object toJSON();
+    };
     PerformancePaintTiming includes PaintTimingMixin;
 
@@ -235,6 +237,7 @@ The {{PerformancePaintTiming}} interface {#sec-PerformancePaintTiming} * The {{PerformanceEntry/entryType}} attribute's getter must return "paint". * The {{PerformanceEntry/startTime}} attribute's getter must return a {{DOMHighResTimeStamp}} of when the paint occured. * The {{PerformanceEntry/duration}} attribute's getter must return 0. +* When toJSON is called, run the [=default toJSON steps=] for {{PerformancePaintTiming}}. NOTE: A user agent implementing {{PerformancePaintTiming}} would need to include "paint" in {{PerformanceObserver/supportedEntryTypes}} of a [=realm/global object=] whose [=Window/browsing context=] is [=paint-timing eligible=]. This allows developers to detect support for paint timing for a particular [=browsing context=].