@@ -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