From 6d6a3cdb2655427c7e31dc2190dabea99f216a94 Mon Sep 17 00:00:00 2001 From: Carlos Quiroz <3615303+cquiroz@users.noreply.github.com> Date: Mon, 4 Jul 2022 17:36:40 -0400 Subject: [PATCH 1/9] Improvements to the Performance API --- dom/src/main/scala/org/scalajs/dom/Performance.scala | 8 ++++---- dom/src/main/scala/org/scalajs/dom/PerformanceEntry.scala | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dom/src/main/scala/org/scalajs/dom/Performance.scala b/dom/src/main/scala/org/scalajs/dom/Performance.scala index 5a5a00dd4..63931105e 100644 --- a/dom/src/main/scala/org/scalajs/dom/Performance.scala +++ b/dom/src/main/scala/org/scalajs/dom/Performance.scala @@ -15,7 +15,7 @@ import scala.scalajs.js.annotation._ */ @js.native @JSGlobal -class Performance extends js.Object { +class Performance private[this]() extends js.Object { /** The Performance.navigation read-only property returns a PerformanceNavigation object representing the type of * navigation that occurs in the given browsing context, like the amount of redirections needed to fetch the @@ -28,7 +28,7 @@ class Performance extends js.Object { */ def timing: PerformanceTiming = js.native - def getEntriesByType(entryType: String): js.Dynamic = js.native + def getEntriesByType(entryType: String): js.Array[PerformanceEntry] = js.native /** Is a jsonizer returning a json object representing the Performance object. */ def toJSON(): js.Dynamic = js.native @@ -45,9 +45,9 @@ class Performance extends js.Object { def measure(measureName: String, startMarkName: String = js.native, endMarkName: String = js.native): Unit = js.native - def getEntriesByName(name: String, entryType: String = js.native): js.Dynamic = js.native + def getEntriesByName(name: String, entryType: String = js.native): js.Array[PerformanceEntry] = js.native - def getEntries(): js.Dynamic = js.native + def getEntries(): js.Array[PerformanceEntry] = js.native def clearMeasures(measureName: String = js.native): Unit = js.native diff --git a/dom/src/main/scala/org/scalajs/dom/PerformanceEntry.scala b/dom/src/main/scala/org/scalajs/dom/PerformanceEntry.scala index 781238c55..3754758cb 100644 --- a/dom/src/main/scala/org/scalajs/dom/PerformanceEntry.scala +++ b/dom/src/main/scala/org/scalajs/dom/PerformanceEntry.scala @@ -16,7 +16,7 @@ class PerformanceEntry extends js.Object { def startTime: Double = js.native - def duration: Int = js.native + def duration: Double = js.native def entryType: String = js.native } From 38b89883f10f2fe689973a1047ba4bb9e6720746 Mon Sep 17 00:00:00 2001 From: Carlos Quiroz <3615303+cquiroz@users.noreply.github.com> Date: Mon, 4 Jul 2022 17:40:39 -0400 Subject: [PATCH 2/9] run prePR --- api-reports/2_12.txt | 14 +++++++------- api-reports/2_13.txt | 14 +++++++------- .../main/scala/org/scalajs/dom/Performance.scala | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/api-reports/2_12.txt b/api-reports/2_12.txt index f16a5a82e..b9a63f313 100644 --- a/api-reports/2_12.txt +++ b/api-reports/2_12.txt @@ -15763,9 +15763,9 @@ Pbkdf2Params[SO] val salt = salt0 Performance[JC] def clearMarks(markName: String?): Unit Performance[JC] def clearMeasures(measureName: String?): Unit Performance[JC] def clearResourceTimings(): Unit -Performance[JC] def getEntries(): js.Dynamic -Performance[JC] def getEntriesByName(name: String, entryType: String?): js.Dynamic -Performance[JC] def getEntriesByType(entryType: String): js.Dynamic +Performance[JC] def getEntries(): js.Array[PerformanceEntry] +Performance[JC] def getEntriesByName(name: String, entryType: String?): js.Array[PerformanceEntry] +Performance[JC] def getEntriesByType(entryType: String): js.Array[PerformanceEntry] Performance[JC] def getMarks(markName: String?): js.Dynamic Performance[JC] def getMeasures(measureName: String?): js.Dynamic Performance[JC] def mark(markName: String): Unit @@ -15775,15 +15775,15 @@ Performance[JC] def now(): Double Performance[JC] def setResourceTimingBufferSize(maxSize: Int): Unit Performance[JC] def timing: PerformanceTiming Performance[JC] def toJSON(): js.Dynamic -PerformanceEntry[JC] def duration: Int +PerformanceEntry[JC] def duration: Double PerformanceEntry[JC] def entryType: String PerformanceEntry[JC] def name: String PerformanceEntry[JC] def startTime: Double -PerformanceMark[JC] def duration: Int +PerformanceMark[JC] def duration: Double PerformanceMark[JC] def entryType: String PerformanceMark[JC] def name: String PerformanceMark[JC] def startTime: Double -PerformanceMeasure[JC] def duration: Int +PerformanceMeasure[JC] def duration: Double PerformanceMeasure[JC] def entryType: String PerformanceMeasure[JC] def name: String PerformanceMeasure[JC] def startTime: Double @@ -15798,7 +15798,7 @@ PerformanceResourceTiming[JC] def connectEnd: Int PerformanceResourceTiming[JC] def connectStart: Int PerformanceResourceTiming[JC] def domainLookupEnd: Int PerformanceResourceTiming[JC] def domainLookupStart: Int -PerformanceResourceTiming[JC] def duration: Int +PerformanceResourceTiming[JC] def duration: Double PerformanceResourceTiming[JC] def entryType: String PerformanceResourceTiming[JC] def fetchStart: Int PerformanceResourceTiming[JC] def initiatorType: String diff --git a/api-reports/2_13.txt b/api-reports/2_13.txt index f16a5a82e..b9a63f313 100644 --- a/api-reports/2_13.txt +++ b/api-reports/2_13.txt @@ -15763,9 +15763,9 @@ Pbkdf2Params[SO] val salt = salt0 Performance[JC] def clearMarks(markName: String?): Unit Performance[JC] def clearMeasures(measureName: String?): Unit Performance[JC] def clearResourceTimings(): Unit -Performance[JC] def getEntries(): js.Dynamic -Performance[JC] def getEntriesByName(name: String, entryType: String?): js.Dynamic -Performance[JC] def getEntriesByType(entryType: String): js.Dynamic +Performance[JC] def getEntries(): js.Array[PerformanceEntry] +Performance[JC] def getEntriesByName(name: String, entryType: String?): js.Array[PerformanceEntry] +Performance[JC] def getEntriesByType(entryType: String): js.Array[PerformanceEntry] Performance[JC] def getMarks(markName: String?): js.Dynamic Performance[JC] def getMeasures(measureName: String?): js.Dynamic Performance[JC] def mark(markName: String): Unit @@ -15775,15 +15775,15 @@ Performance[JC] def now(): Double Performance[JC] def setResourceTimingBufferSize(maxSize: Int): Unit Performance[JC] def timing: PerformanceTiming Performance[JC] def toJSON(): js.Dynamic -PerformanceEntry[JC] def duration: Int +PerformanceEntry[JC] def duration: Double PerformanceEntry[JC] def entryType: String PerformanceEntry[JC] def name: String PerformanceEntry[JC] def startTime: Double -PerformanceMark[JC] def duration: Int +PerformanceMark[JC] def duration: Double PerformanceMark[JC] def entryType: String PerformanceMark[JC] def name: String PerformanceMark[JC] def startTime: Double -PerformanceMeasure[JC] def duration: Int +PerformanceMeasure[JC] def duration: Double PerformanceMeasure[JC] def entryType: String PerformanceMeasure[JC] def name: String PerformanceMeasure[JC] def startTime: Double @@ -15798,7 +15798,7 @@ PerformanceResourceTiming[JC] def connectEnd: Int PerformanceResourceTiming[JC] def connectStart: Int PerformanceResourceTiming[JC] def domainLookupEnd: Int PerformanceResourceTiming[JC] def domainLookupStart: Int -PerformanceResourceTiming[JC] def duration: Int +PerformanceResourceTiming[JC] def duration: Double PerformanceResourceTiming[JC] def entryType: String PerformanceResourceTiming[JC] def fetchStart: Int PerformanceResourceTiming[JC] def initiatorType: String diff --git a/dom/src/main/scala/org/scalajs/dom/Performance.scala b/dom/src/main/scala/org/scalajs/dom/Performance.scala index 63931105e..b1bf3d76e 100644 --- a/dom/src/main/scala/org/scalajs/dom/Performance.scala +++ b/dom/src/main/scala/org/scalajs/dom/Performance.scala @@ -15,7 +15,7 @@ import scala.scalajs.js.annotation._ */ @js.native @JSGlobal -class Performance private[this]() extends js.Object { +class Performance private[this] () extends js.Object { /** The Performance.navigation read-only property returns a PerformanceNavigation object representing the type of * navigation that occurs in the given browsing context, like the amount of redirections needed to fetch the From cbc769fcd6d0702a3d1e5f1837cba161218293f5 Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Thu, 9 Feb 2023 17:29:55 +0000 Subject: [PATCH 3/9] Back to `Int` for `duration` --- api-reports/2_13.txt | 8 ++++---- dom/src/main/scala/org/scalajs/dom/PerformanceEntry.scala | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api-reports/2_13.txt b/api-reports/2_13.txt index b9a63f313..36d85dd86 100644 --- a/api-reports/2_13.txt +++ b/api-reports/2_13.txt @@ -15775,15 +15775,15 @@ Performance[JC] def now(): Double Performance[JC] def setResourceTimingBufferSize(maxSize: Int): Unit Performance[JC] def timing: PerformanceTiming Performance[JC] def toJSON(): js.Dynamic -PerformanceEntry[JC] def duration: Double +PerformanceEntry[JC] def duration: Int PerformanceEntry[JC] def entryType: String PerformanceEntry[JC] def name: String PerformanceEntry[JC] def startTime: Double -PerformanceMark[JC] def duration: Double +PerformanceMark[JC] def duration: Int PerformanceMark[JC] def entryType: String PerformanceMark[JC] def name: String PerformanceMark[JC] def startTime: Double -PerformanceMeasure[JC] def duration: Double +PerformanceMeasure[JC] def duration: Int PerformanceMeasure[JC] def entryType: String PerformanceMeasure[JC] def name: String PerformanceMeasure[JC] def startTime: Double @@ -15798,7 +15798,7 @@ PerformanceResourceTiming[JC] def connectEnd: Int PerformanceResourceTiming[JC] def connectStart: Int PerformanceResourceTiming[JC] def domainLookupEnd: Int PerformanceResourceTiming[JC] def domainLookupStart: Int -PerformanceResourceTiming[JC] def duration: Double +PerformanceResourceTiming[JC] def duration: Int PerformanceResourceTiming[JC] def entryType: String PerformanceResourceTiming[JC] def fetchStart: Int PerformanceResourceTiming[JC] def initiatorType: String diff --git a/dom/src/main/scala/org/scalajs/dom/PerformanceEntry.scala b/dom/src/main/scala/org/scalajs/dom/PerformanceEntry.scala index 3754758cb..781238c55 100644 --- a/dom/src/main/scala/org/scalajs/dom/PerformanceEntry.scala +++ b/dom/src/main/scala/org/scalajs/dom/PerformanceEntry.scala @@ -16,7 +16,7 @@ class PerformanceEntry extends js.Object { def startTime: Double = js.native - def duration: Double = js.native + def duration: Int = js.native def entryType: String = js.native } From 1ee7b405763affc9d50e025560b68b5640facfbf Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Thu, 9 Feb 2023 17:33:16 +0000 Subject: [PATCH 4/9] Add some docs --- .../scala/org/scalajs/dom/PerformanceEntry.scala | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dom/src/main/scala/org/scalajs/dom/PerformanceEntry.scala b/dom/src/main/scala/org/scalajs/dom/PerformanceEntry.scala index 781238c55..cdc487b6f 100644 --- a/dom/src/main/scala/org/scalajs/dom/PerformanceEntry.scala +++ b/dom/src/main/scala/org/scalajs/dom/PerformanceEntry.scala @@ -9,14 +9,26 @@ package org.scalajs.dom import scala.scalajs.js import scala.scalajs.js.annotation._ +/** Encapsulates a single performance metric that is part of the browser's performance timeline. */ @js.native @JSGlobal class PerformanceEntry extends js.Object { + + /** The name for a performance entry. It acts as an identifier, but it does not have to be unique. The value depends + * on the subclass. + */ def name: String = js.native + /** The first timestamp recorded for this performance entry. The meaning of this property depends on the value of this + * entry's [[entryType]]. + */ def startTime: Double = js.native + /** The duration of the performance entry. The meaning of this property depends on the value of this entry's + * [[entryType]]. + */ def duration: Int = js.native + /** The type of performance metric that this entry represents. */ def entryType: String = js.native } From 12deff1ee452dee85aba35f8ee5535bfb61f0558 Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Thu, 9 Feb 2023 17:36:24 +0000 Subject: [PATCH 5/9] Add `toJSON()` --- api-reports/2_13.txt | 4 ++++ dom/src/main/scala/org/scalajs/dom/PerformanceEntry.scala | 3 +++ 2 files changed, 7 insertions(+) diff --git a/api-reports/2_13.txt b/api-reports/2_13.txt index 36d85dd86..9f079c90c 100644 --- a/api-reports/2_13.txt +++ b/api-reports/2_13.txt @@ -15779,14 +15779,17 @@ PerformanceEntry[JC] def duration: Int PerformanceEntry[JC] def entryType: String PerformanceEntry[JC] def name: String PerformanceEntry[JC] def startTime: Double +PerformanceEntry[JC] def toJSON(): js.Object PerformanceMark[JC] def duration: Int PerformanceMark[JC] def entryType: String PerformanceMark[JC] def name: String PerformanceMark[JC] def startTime: Double +PerformanceMark[JC] def toJSON(): js.Object PerformanceMeasure[JC] def duration: Int PerformanceMeasure[JC] def entryType: String PerformanceMeasure[JC] def name: String PerformanceMeasure[JC] def startTime: Double +PerformanceMeasure[JC] def toJSON(): js.Object PerformanceNavigation[JC] def redirectCount: Int PerformanceNavigation[JC] def toJSON(): js.Dynamic PerformanceNavigation[JC] def `type`: Int @@ -15809,6 +15812,7 @@ PerformanceResourceTiming[JC] def requestStart: Int PerformanceResourceTiming[JC] var responseEnd: Int PerformanceResourceTiming[JC] def responseStart: Int PerformanceResourceTiming[JC] def startTime: Double +PerformanceResourceTiming[JC] def toJSON(): js.Object PerformanceTiming[JC] def connectEnd: Double PerformanceTiming[JC] def connectStart: Double PerformanceTiming[JC] def domComplete: Double diff --git a/dom/src/main/scala/org/scalajs/dom/PerformanceEntry.scala b/dom/src/main/scala/org/scalajs/dom/PerformanceEntry.scala index cdc487b6f..3511259ee 100644 --- a/dom/src/main/scala/org/scalajs/dom/PerformanceEntry.scala +++ b/dom/src/main/scala/org/scalajs/dom/PerformanceEntry.scala @@ -31,4 +31,7 @@ class PerformanceEntry extends js.Object { /** The type of performance metric that this entry represents. */ def entryType: String = js.native + + /** Returns a JSON representation of the [[PerformanceEntry]] object. */ + def toJSON(): js.Object = js.native } From 1066217097e45f2686c6c5fd7458b55956cacddd Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Thu, 9 Feb 2023 19:01:40 +0000 Subject: [PATCH 6/9] Refresh `Performance` --- api-reports/2_13.txt | 12 ++++---- .../scala/org/scalajs/dom/Performance.scala | 28 ++++++++++++++++--- 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/api-reports/2_13.txt b/api-reports/2_13.txt index 9f079c90c..7c307825a 100644 --- a/api-reports/2_13.txt +++ b/api-reports/2_13.txt @@ -15764,17 +15764,17 @@ Performance[JC] def clearMarks(markName: String?): Unit Performance[JC] def clearMeasures(measureName: String?): Unit Performance[JC] def clearResourceTimings(): Unit Performance[JC] def getEntries(): js.Array[PerformanceEntry] -Performance[JC] def getEntriesByName(name: String, entryType: String?): js.Array[PerformanceEntry] +Performance[JC] def getEntriesByName(name: String, `type`: String?): js.Array[PerformanceEntry] Performance[JC] def getEntriesByType(entryType: String): js.Array[PerformanceEntry] -Performance[JC] def getMarks(markName: String?): js.Dynamic -Performance[JC] def getMeasures(measureName: String?): js.Dynamic -Performance[JC] def mark(markName: String): Unit -Performance[JC] def measure(measureName: String, startMarkName: String?, endMarkName: String?): Unit +Performance[JC] def getMarks(markName: String?): js.Dynamic (@deprecated in 2.4.0) +Performance[JC] def getMeasures(measureName: String?): js.Dynamic (@deprecated in 2.4.0) +Performance[JC] def mark(markName: String): PerformanceMark +Performance[JC] def measure(measureName: String, startMarkName: String?, endMarkName: String?): PerformanceMeasure Performance[JC] def navigation: PerformanceNavigation Performance[JC] def now(): Double Performance[JC] def setResourceTimingBufferSize(maxSize: Int): Unit Performance[JC] def timing: PerformanceTiming -Performance[JC] def toJSON(): js.Dynamic +Performance[JC] def toJSON(): js.Object PerformanceEntry[JC] def duration: Int PerformanceEntry[JC] def entryType: String PerformanceEntry[JC] def name: String diff --git a/dom/src/main/scala/org/scalajs/dom/Performance.scala b/dom/src/main/scala/org/scalajs/dom/Performance.scala index b1bf3d76e..04731c8b0 100644 --- a/dom/src/main/scala/org/scalajs/dom/Performance.scala +++ b/dom/src/main/scala/org/scalajs/dom/Performance.scala @@ -28,29 +28,49 @@ class Performance private[this] () extends js.Object { */ def timing: PerformanceTiming = js.native + /** Returns an array of [[PerformanceEntry]] objects currently present in the performance timeline for a given type */ def getEntriesByType(entryType: String): js.Array[PerformanceEntry] = js.native /** Is a jsonizer returning a json object representing the Performance object. */ - def toJSON(): js.Dynamic = js.native + def toJSON(): js.Object = js.native + @deprecated("No such API in the spec", "2.4.0") def getMeasures(measureName: String = js.native): js.Dynamic = js.native + /** Removes all or specific [[PerformanceMark]] objects from the browser's performance timeline. */ def clearMarks(markName: String = js.native): Unit = js.native + @deprecated("No such API in the spec", "2.4.0") def getMarks(markName: String = js.native): js.Dynamic = js.native + /** Removes all performance entries with an `entryType` of "resource" from the browser's performance timeline and sets + * the size of the performance resource data buffer to zero. + */ def clearResourceTimings(): Unit = js.native - def mark(markName: String): Unit = js.native + /** Creates a named [[PerformanceMark]] object representing a high resolution timestamp marker in the browser's + * performance timeline. + */ + def mark(markName: String): PerformanceMark = js.native - def measure(measureName: String, startMarkName: String = js.native, endMarkName: String = js.native): Unit = js.native + /** Creates a named [[PerformanceMeasure]] object representing a time measurement between two marks in the browser's + * performance timeline. + */ + def measure(measureName: String, startMarkName: String = js.native, + endMarkName: String = js.native): PerformanceMeasure = js.native - def getEntriesByName(name: String, entryType: String = js.native): js.Array[PerformanceEntry] = js.native + /** Returns an array of [[PerformanceEntry]] objects currently present in the performance timeline with the given name + * and type. + */ + def getEntriesByName(name: String, `type`: String = js.native): js.Array[PerformanceEntry] = js.native + /** All [[PerformanceEntry]] objects currently present in the performance timeline. */ def getEntries(): js.Array[PerformanceEntry] = js.native + /** Removes all or specific [[PerformanceMeasure]] objects from the browser's performance timeline. */ def clearMeasures(measureName: String = js.native): Unit = js.native + /** sets the desired size of the browser's resource timing buffer which stores the "resource" performance entries. */ def setResourceTimingBufferSize(maxSize: Int): Unit = js.native /** Returns a DOMHighResTimeStamp representing the amount of milliseconds elapsed since the start of the navigation, From 12eea31da1d6941bc5a26ebb152b2e0434857703 Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Thu, 9 Feb 2023 19:03:21 +0000 Subject: [PATCH 7/9] API reports on 2.12 --- api-reports/2_12.txt | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/api-reports/2_12.txt b/api-reports/2_12.txt index b9a63f313..7c307825a 100644 --- a/api-reports/2_12.txt +++ b/api-reports/2_12.txt @@ -15764,29 +15764,32 @@ Performance[JC] def clearMarks(markName: String?): Unit Performance[JC] def clearMeasures(measureName: String?): Unit Performance[JC] def clearResourceTimings(): Unit Performance[JC] def getEntries(): js.Array[PerformanceEntry] -Performance[JC] def getEntriesByName(name: String, entryType: String?): js.Array[PerformanceEntry] +Performance[JC] def getEntriesByName(name: String, `type`: String?): js.Array[PerformanceEntry] Performance[JC] def getEntriesByType(entryType: String): js.Array[PerformanceEntry] -Performance[JC] def getMarks(markName: String?): js.Dynamic -Performance[JC] def getMeasures(measureName: String?): js.Dynamic -Performance[JC] def mark(markName: String): Unit -Performance[JC] def measure(measureName: String, startMarkName: String?, endMarkName: String?): Unit +Performance[JC] def getMarks(markName: String?): js.Dynamic (@deprecated in 2.4.0) +Performance[JC] def getMeasures(measureName: String?): js.Dynamic (@deprecated in 2.4.0) +Performance[JC] def mark(markName: String): PerformanceMark +Performance[JC] def measure(measureName: String, startMarkName: String?, endMarkName: String?): PerformanceMeasure Performance[JC] def navigation: PerformanceNavigation Performance[JC] def now(): Double Performance[JC] def setResourceTimingBufferSize(maxSize: Int): Unit Performance[JC] def timing: PerformanceTiming -Performance[JC] def toJSON(): js.Dynamic -PerformanceEntry[JC] def duration: Double +Performance[JC] def toJSON(): js.Object +PerformanceEntry[JC] def duration: Int PerformanceEntry[JC] def entryType: String PerformanceEntry[JC] def name: String PerformanceEntry[JC] def startTime: Double -PerformanceMark[JC] def duration: Double +PerformanceEntry[JC] def toJSON(): js.Object +PerformanceMark[JC] def duration: Int PerformanceMark[JC] def entryType: String PerformanceMark[JC] def name: String PerformanceMark[JC] def startTime: Double -PerformanceMeasure[JC] def duration: Double +PerformanceMark[JC] def toJSON(): js.Object +PerformanceMeasure[JC] def duration: Int PerformanceMeasure[JC] def entryType: String PerformanceMeasure[JC] def name: String PerformanceMeasure[JC] def startTime: Double +PerformanceMeasure[JC] def toJSON(): js.Object PerformanceNavigation[JC] def redirectCount: Int PerformanceNavigation[JC] def toJSON(): js.Dynamic PerformanceNavigation[JC] def `type`: Int @@ -15798,7 +15801,7 @@ PerformanceResourceTiming[JC] def connectEnd: Int PerformanceResourceTiming[JC] def connectStart: Int PerformanceResourceTiming[JC] def domainLookupEnd: Int PerformanceResourceTiming[JC] def domainLookupStart: Int -PerformanceResourceTiming[JC] def duration: Double +PerformanceResourceTiming[JC] def duration: Int PerformanceResourceTiming[JC] def entryType: String PerformanceResourceTiming[JC] def fetchStart: Int PerformanceResourceTiming[JC] def initiatorType: String @@ -15809,6 +15812,7 @@ PerformanceResourceTiming[JC] def requestStart: Int PerformanceResourceTiming[JC] var responseEnd: Int PerformanceResourceTiming[JC] def responseStart: Int PerformanceResourceTiming[JC] def startTime: Double +PerformanceResourceTiming[JC] def toJSON(): js.Object PerformanceTiming[JC] def connectEnd: Double PerformanceTiming[JC] def connectStart: Double PerformanceTiming[JC] def domComplete: Double From ce8678d6d45eedd3b65a680cc53e44f6a3f2b697 Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Mon, 25 Sep 2023 14:31:27 -0700 Subject: [PATCH 8/9] Doc fixes Co-authored-by: zetashift --- dom/src/main/scala/org/scalajs/dom/Performance.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dom/src/main/scala/org/scalajs/dom/Performance.scala b/dom/src/main/scala/org/scalajs/dom/Performance.scala index 04731c8b0..d629b468b 100644 --- a/dom/src/main/scala/org/scalajs/dom/Performance.scala +++ b/dom/src/main/scala/org/scalajs/dom/Performance.scala @@ -31,7 +31,7 @@ class Performance private[this] () extends js.Object { /** Returns an array of [[PerformanceEntry]] objects currently present in the performance timeline for a given type */ def getEntriesByType(entryType: String): js.Array[PerformanceEntry] = js.native - /** Is a jsonizer returning a json object representing the Performance object. */ + /** Returns a JSON representation of the [[Performance]] object. */ def toJSON(): js.Object = js.native @deprecated("No such API in the spec", "2.4.0") @@ -70,7 +70,7 @@ class Performance private[this] () extends js.Object { /** Removes all or specific [[PerformanceMeasure]] objects from the browser's performance timeline. */ def clearMeasures(measureName: String = js.native): Unit = js.native - /** sets the desired size of the browser's resource timing buffer which stores the "resource" performance entries. */ + /** Sets the desired size of the browser's resource timing buffer which stores the "resource" performance entries. */ def setResourceTimingBufferSize(maxSize: Int): Unit = js.native /** Returns a DOMHighResTimeStamp representing the amount of milliseconds elapsed since the start of the navigation, From b2d400b262fe0b9541799fe8cdb73621e0a00c7d Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Tue, 26 Sep 2023 17:43:35 +0000 Subject: [PATCH 9/9] Update deprecation version --- api-reports/2_12.txt | 4 ++-- api-reports/2_13.txt | 4 ++-- dom/src/main/scala/org/scalajs/dom/Performance.scala | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/api-reports/2_12.txt b/api-reports/2_12.txt index 7c307825a..a57634964 100644 --- a/api-reports/2_12.txt +++ b/api-reports/2_12.txt @@ -15766,8 +15766,8 @@ Performance[JC] def clearResourceTimings(): Unit Performance[JC] def getEntries(): js.Array[PerformanceEntry] Performance[JC] def getEntriesByName(name: String, `type`: String?): js.Array[PerformanceEntry] Performance[JC] def getEntriesByType(entryType: String): js.Array[PerformanceEntry] -Performance[JC] def getMarks(markName: String?): js.Dynamic (@deprecated in 2.4.0) -Performance[JC] def getMeasures(measureName: String?): js.Dynamic (@deprecated in 2.4.0) +Performance[JC] def getMarks(markName: String?): js.Dynamic (@deprecated in 2.8.0) +Performance[JC] def getMeasures(measureName: String?): js.Dynamic (@deprecated in 2.8.0) Performance[JC] def mark(markName: String): PerformanceMark Performance[JC] def measure(measureName: String, startMarkName: String?, endMarkName: String?): PerformanceMeasure Performance[JC] def navigation: PerformanceNavigation diff --git a/api-reports/2_13.txt b/api-reports/2_13.txt index 7c307825a..a57634964 100644 --- a/api-reports/2_13.txt +++ b/api-reports/2_13.txt @@ -15766,8 +15766,8 @@ Performance[JC] def clearResourceTimings(): Unit Performance[JC] def getEntries(): js.Array[PerformanceEntry] Performance[JC] def getEntriesByName(name: String, `type`: String?): js.Array[PerformanceEntry] Performance[JC] def getEntriesByType(entryType: String): js.Array[PerformanceEntry] -Performance[JC] def getMarks(markName: String?): js.Dynamic (@deprecated in 2.4.0) -Performance[JC] def getMeasures(measureName: String?): js.Dynamic (@deprecated in 2.4.0) +Performance[JC] def getMarks(markName: String?): js.Dynamic (@deprecated in 2.8.0) +Performance[JC] def getMeasures(measureName: String?): js.Dynamic (@deprecated in 2.8.0) Performance[JC] def mark(markName: String): PerformanceMark Performance[JC] def measure(measureName: String, startMarkName: String?, endMarkName: String?): PerformanceMeasure Performance[JC] def navigation: PerformanceNavigation diff --git a/dom/src/main/scala/org/scalajs/dom/Performance.scala b/dom/src/main/scala/org/scalajs/dom/Performance.scala index d629b468b..0d25706ef 100644 --- a/dom/src/main/scala/org/scalajs/dom/Performance.scala +++ b/dom/src/main/scala/org/scalajs/dom/Performance.scala @@ -34,13 +34,13 @@ class Performance private[this] () extends js.Object { /** Returns a JSON representation of the [[Performance]] object. */ def toJSON(): js.Object = js.native - @deprecated("No such API in the spec", "2.4.0") + @deprecated("No such API in the spec", "2.8.0") def getMeasures(measureName: String = js.native): js.Dynamic = js.native /** Removes all or specific [[PerformanceMark]] objects from the browser's performance timeline. */ def clearMarks(markName: String = js.native): Unit = js.native - @deprecated("No such API in the spec", "2.4.0") + @deprecated("No such API in the spec", "2.8.0") def getMarks(markName: String = js.native): js.Dynamic = js.native /** Removes all performance entries with an `entryType` of "resource" from the browser's performance timeline and sets