Class ComputePressureObserverWrapper
Hierarchy
- ComputePressureObserverWrapper
Index
Constructors
constructor
A compute pressure observer will call this callback, whenever these thresholds are met.
Parameters
callback: (update: IComputePressureData) => void
The callback that is called whenever thresholds are met.
Parameters
update: IComputePressureData
Returns void
thresholds: IComputePressureThresholds
An object containing the thresholds used to decide what value to to return for each update property (average of start and end of a threshold boundary).
Returns ComputePressureObserverWrapper
Accessors
Static Is Available
Returns true if ComputePressureObserver is available for use, false otherwise.
Returns boolean
Methods
observeSearch playground for observe
Method that must be called to begin observing changes, and triggering callbacks.
Returns void
unobserveSearch playground for unobserve
Method that must be called to stop observing changes and triggering callbacks (cleanup function).
Returns void
A wrapper for the experimental compute pressure api which allows a callback to be called whenever certain thresholds are met.