@@ -28,29 +28,49 @@ class Performance private[this] () extends js.Object {
28
28
*/
29
29
def timing : PerformanceTiming = js.native
30
30
31
+ /** Returns an array of [[PerformanceEntry ]] objects currently present in the performance timeline for a given type */
31
32
def getEntriesByType (entryType : String ): js.Array [PerformanceEntry ] = js.native
32
33
33
34
/** 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
35
36
37
+ @ deprecated(" No such API in the spec" , " 2.4.0" )
36
38
def getMeasures (measureName : String = js.native): js.Dynamic = js.native
37
39
40
+ /** Removes all or specific [[PerformanceMark ]] objects from the browser's performance timeline. */
38
41
def clearMarks (markName : String = js.native): Unit = js.native
39
42
43
+ @ deprecated(" No such API in the spec" , " 2.4.0" )
40
44
def getMarks (markName : String = js.native): js.Dynamic = js.native
41
45
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
+ */
42
49
def clearResourceTimings (): Unit = js.native
43
50
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
45
55
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
47
61
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
49
66
67
+ /** All [[PerformanceEntry ]] objects currently present in the performance timeline. */
50
68
def getEntries (): js.Array [PerformanceEntry ] = js.native
51
69
70
+ /** Removes all or specific [[PerformanceMeasure ]] objects from the browser's performance timeline. */
52
71
def clearMeasures (measureName : String = js.native): Unit = js.native
53
72
73
+ /** sets the desired size of the browser's resource timing buffer which stores the "resource" performance entries. */
54
74
def setResourceTimingBufferSize (maxSize : Int ): Unit = js.native
55
75
56
76
/** Returns a DOMHighResTimeStamp representing the amount of milliseconds elapsed since the start of the navigation,
0 commit comments