PerformanceObserver

@JSImport("perf_hooks", "PerformanceObserver") @native @JSType class PerformanceObserver extends AsyncResource
trait StObject
class Object
trait Any
class Object
trait Matchable
class Any

Value members

Constructors

Concrete methods

def disconnect(): Unit

Disconnects the PerformanceObserver instance from all notifications.

Disconnects the PerformanceObserver instance from all notifications.

def observe(options: EntryTypes): Unit

Subscribes the PerformanceObserver instance to notifications of new PerformanceEntry instances identified by options.entryTypes or options.type. When options.buffered is false, the callback will be invoked once for every PerformanceEntry instance.

Subscribes the PerformanceObserver instance to notifications of new PerformanceEntry instances identified by options.entryTypes or options.type. When options.buffered is false, the callback will be invoked once for every PerformanceEntry instance.

def observe(options: TypeEntryType): Unit

Inherited methods

def asyncId(): Double
Returns

the unique ID assigned to this AsyncResource instance.

Inherited from
AsyncResource
def bind[Func](fn: Func): Func & AsyncResource

Binds the given function to execute to this AsyncResource's scope.

Binds the given function to execute to this AsyncResource's scope.

Value Params
fn

The function to bind to the current AsyncResource.

Inherited from
AsyncResource

Call AsyncHooks destroy callbacks.

Call AsyncHooks destroy callbacks.

Inherited from
AsyncResource
def hasOwnProperty(v: String): Boolean
Inherited from
Object
def isPrototypeOf(v: Object): Boolean
Inherited from
Object
def propertyIsEnumerable(v: String): Boolean
Inherited from
Object
def runInAsyncScope[This, Result](fn: ThisFunction1[This, Any, Result], thisArg: Unit, args: Any*): Result
Inherited from
AsyncResource
def runInAsyncScope[This, Result](fn: ThisFunction1[This, Any, Result], thisArg: This, args: Any*): Result

Call the provided function with the provided arguments in the execution context of the async resource. This will establish the context, trigger the AsyncHooks before callbacks, call the function, trigger the AsyncHooks after callbacks, and then restore the original execution context.

Call the provided function with the provided arguments in the execution context of the async resource. This will establish the context, trigger the AsyncHooks before callbacks, call the function, trigger the AsyncHooks after callbacks, and then restore the original execution context.

Value Params
args

Optional arguments to pass to the function.

fn

The function to call in the execution context of this async resource.

thisArg

The receiver to be used for the function call.

Inherited from
AsyncResource
def toLocaleString(): String
Inherited from
Object
def triggerAsyncId(): Double
Returns

the trigger ID for this AsyncResource instance.

Inherited from
AsyncResource
def valueOf(): Any
Inherited from
Object