A wrapper for the experimental compute pressure api which allows a callback to be called whenever certain thresholds are met.
A compute pressure observer will call this callback, whenever these thresholds are met.
callback: (update: IComputePressureData) => void
The callback that is called whenever thresholds are met.
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 true if ComputePressureObserver is available for use, false otherwise.
Method that must be called to begin observing changes, and triggering callbacks.
unobserveSearch playground for unobserve
Method that must be called to stop observing changes and triggering callbacks (cleanup function).