Search e01
One query across the encyclopedia, books, dictionary, papers, Wikidata and the developer library. Every hit carries its source.
6 results across 6 corpora for PressureObserver.
Dictionary 0
This corpus is unavailable: timeout
Papers 0
This corpus is unavailable: timeout
Wikidata 0
This corpus is unavailable: timeout
Developer library 6
PressureObserver
Compute Pressure APIwindow_and_worker_except_service The **`PressureObserver`** interface is part of the [Compute Pressure API](/docs/Web/API/Compute_Pressure_API) and is used to observe the pressure changes of system resources such as the CPU. ## Constructor - PressureObserver() - : Creates and returns a new `PressureObserver` object. ## Static properties - PressureObserver.knownSources - : Returns an ar
PressureObserver: PressureObserver() constructor
Compute Pressure APIwindow_and_worker_except_service The **`PressureObserver()`** constructor creates a new PressureObserver object to watch for changes to pressure changes of system resources such as the CPU. ## Syntax ```js-nolint new PressureObserver(callback) ``` ### Parameters - `callback` - : A callback that will be invoked when pressure records are observed. When the callback is invoked, the following p
PressureObserver: unobserve() method
Compute Pressure APIwindow_and_worker_except_service The **`unobserve()`** method of the PressureObserver interface stops the pressure observer callback from receiving pressure records from the specified source. ## Syntax ```js-nolint unobserve(source) ``` ### Parameters - `source` - : A string specifying which source to unobserve. ### Return value None (undefined). ## Examples ### Stop observing a specifi
PressureObserver: takeRecords() method
Compute Pressure APIwindow_and_worker_except_service The **`takeRecords()`** method of the PressureObserver interface returns the current list of pressure records stored in the pressure observer, emptying it out. It is useful when you want to a stop observing a source but would like to be sure to get any records that have not yet been passed into the observer callback. ## Syntax ```js-nolint takeRecords() ``` ##
PressureObserver: knownSources static property
Compute Pressure APIwindow_and_worker_except_service The static **`knownSources`** read-only property of the PressureObserver interface returns an array of the source values supported by the user agent in alphabetical order. > [!NOTE] > The list of supported sources varies per browser, operating system, and hardware, and is evolving. This property is merely a hint about source types the user agents supports. Call o
PressureObserver: observe() method
Compute Pressure APIwindow_and_worker_except_service The **`observe()`** method of the PressureObserver interface tells the pressure observer to start observing pressure changes. After this method is called, the observer will call its callback function when a pressure record for the specified `source` is observed. When a matching PressureRecord is obtained, the pressure observer's callback function is invoked. ##