PressureObserver: knownSources static property

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

Note: This feature is available in Web Workers, except for Service Workers.

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

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 observe() and check for a NotSupportedError to see if pressure observation is possible.

Value

An array of PressureRecord.source values.

Examples

Using the console to see known sources

To find out which source values a browser knows, enter PressureObserver.knownSources into the console. This will return an array of known sources.

js
PressureObserver.knownSources;
// returns ["cpu"] in Chrome 125

Specifications

Specification
Compute Pressure Level 1
# dom-pressureobserver-knownsources

Browser compatibility

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
knownSources_static
Experimental

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
Experimental. Expect behavior to change in the future.