Skip to content

Commit 1066217

Browse files
committed
Refresh Performance
1 parent 12deff1 commit 1066217

File tree

2 files changed

+30
-10
lines changed

2 files changed

+30
-10
lines changed

api-reports/2_13.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15764,17 +15764,17 @@ Performance[JC] def clearMarks(markName: String?): Unit
1576415764
Performance[JC] def clearMeasures(measureName: String?): Unit
1576515765
Performance[JC] def clearResourceTimings(): Unit
1576615766
Performance[JC] def getEntries(): js.Array[PerformanceEntry]
15767-
Performance[JC] def getEntriesByName(name: String, entryType: String?): js.Array[PerformanceEntry]
15767+
Performance[JC] def getEntriesByName(name: String, `type`: String?): js.Array[PerformanceEntry]
1576815768
Performance[JC] def getEntriesByType(entryType: String): js.Array[PerformanceEntry]
15769-
Performance[JC] def getMarks(markName: String?): js.Dynamic
15770-
Performance[JC] def getMeasures(measureName: String?): js.Dynamic
15771-
Performance[JC] def mark(markName: String): Unit
15772-
Performance[JC] def measure(measureName: String, startMarkName: String?, endMarkName: String?): Unit
15769+
Performance[JC] def getMarks(markName: String?): js.Dynamic (@deprecated in 2.4.0)
15770+
Performance[JC] def getMeasures(measureName: String?): js.Dynamic (@deprecated in 2.4.0)
15771+
Performance[JC] def mark(markName: String): PerformanceMark
15772+
Performance[JC] def measure(measureName: String, startMarkName: String?, endMarkName: String?): PerformanceMeasure
1577315773
Performance[JC] def navigation: PerformanceNavigation
1577415774
Performance[JC] def now(): Double
1577515775
Performance[JC] def setResourceTimingBufferSize(maxSize: Int): Unit
1577615776
Performance[JC] def timing: PerformanceTiming
15777-
Performance[JC] def toJSON(): js.Dynamic
15777+
Performance[JC] def toJSON(): js.Object
1577815778
PerformanceEntry[JC] def duration: Int
1577915779
PerformanceEntry[JC] def entryType: String
1578015780
PerformanceEntry[JC] def name: String

dom/src/main/scala/org/scalajs/dom/Performance.scala

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,29 +28,49 @@ class Performance private[this] () extends js.Object {
2828
*/
2929
def timing: PerformanceTiming = js.native
3030

31+
/** Returns an array of [[PerformanceEntry]] objects currently present in the performance timeline for a given type */
3132
def getEntriesByType(entryType: String): js.Array[PerformanceEntry] = js.native
3233

3334
/** Is a jsonizer returning a json object representing the Performance object. */
34-
def toJSON(): js.Dynamic = js.native
35+
def toJSON(): js.Object = js.native
3536

37+
@deprecated("No such API in the spec", "2.4.0")
3638
def getMeasures(measureName: String = js.native): js.Dynamic = js.native
3739

40+
/** Removes all or specific [[PerformanceMark]] objects from the browser's performance timeline. */
3841
def clearMarks(markName: String = js.native): Unit = js.native
3942

43+
@deprecated("No such API in the spec", "2.4.0")
4044
def getMarks(markName: String = js.native): js.Dynamic = js.native
4145

46+
/** Removes all performance entries with an `entryType` of "resource" from the browser's performance timeline and sets
47+
* the size of the performance resource data buffer to zero.
48+
*/
4249
def clearResourceTimings(): Unit = js.native
4350

44-
def mark(markName: String): Unit = js.native
51+
/** Creates a named [[PerformanceMark]] object representing a high resolution timestamp marker in the browser's
52+
* performance timeline.
53+
*/
54+
def mark(markName: String): PerformanceMark = js.native
4555

46-
def measure(measureName: String, startMarkName: String = js.native, endMarkName: String = js.native): Unit = js.native
56+
/** Creates a named [[PerformanceMeasure]] object representing a time measurement between two marks in the browser's
57+
* performance timeline.
58+
*/
59+
def measure(measureName: String, startMarkName: String = js.native,
60+
endMarkName: String = js.native): PerformanceMeasure = js.native
4761

48-
def getEntriesByName(name: String, entryType: String = js.native): js.Array[PerformanceEntry] = js.native
62+
/** Returns an array of [[PerformanceEntry]] objects currently present in the performance timeline with the given name
63+
* and type.
64+
*/
65+
def getEntriesByName(name: String, `type`: String = js.native): js.Array[PerformanceEntry] = js.native
4966

67+
/** All [[PerformanceEntry]] objects currently present in the performance timeline. */
5068
def getEntries(): js.Array[PerformanceEntry] = js.native
5169

70+
/** Removes all or specific [[PerformanceMeasure]] objects from the browser's performance timeline. */
5271
def clearMeasures(measureName: String = js.native): Unit = js.native
5372

73+
/** sets the desired size of the browser's resource timing buffer which stores the "resource" performance entries. */
5474
def setResourceTimingBufferSize(maxSize: Int): Unit = js.native
5575

5676
/** Returns a DOMHighResTimeStamp representing the amount of milliseconds elapsed since the start of the navigation,

0 commit comments

Comments
 (0)