CARVIEW |
Compute Pressure Level 1
W3C Candidate Recommendation Snapshot
More details about this document
- This version:
- https://www.w3.org/TR/2025/CR-compute-pressure-20250424/
- Latest published version:
- https://www.w3.org/TR/compute-pressure/
- Latest editor's draft:
- https://w3c.github.io/compute-pressure/
- History:
- https://www.w3.org/standards/history/compute-pressure/
- Commit history
- Test suite:
- https://github.com/web-platform-tests/wpt/labels/compute-pressure
- Implementation report:
- https://wpt.fyi/results/compute-pressure
- Editors:
- Kenneth Rohde Christiansen (Intel Corporation)
- Arnaud Mandy (Intel Corporation)
- Former editor:
- Raphael Kubo da Costa (Intel Corporation)
- Feedback:
- GitHub w3c/compute-pressure (pull requests, new issue, open issues)
Copyright © 2025 World Wide Web Consortium. W3C® liability, trademark and permissive document license rules apply.
Abstract
The Compute Pressure API provides a way for websites to react to changes in the CPU pressure of the target device, such that websites can trade off resources for an improved user experience.
Status of This Document
This section describes the status of this document at the time of its publication. A list of current W3C publications and the latest revision of this technical report can be found in the W3C standards and drafts index at https://www.w3.org/TR/.
For this specification to exit the CR stage, at least 2 independent implementations of every feature defined in this specification need to be documented in the implementation report.
This document was published by the Devices and Sensors Working Group as a Candidate Recommendation Snapshot using the Recommendation track.
Publication as a Candidate Recommendation does not imply endorsement by W3C and its Members. A Candidate Recommendation Snapshot has received wide review, is intended to gather implementation experience, and has commitments from Working Group members to royalty-free licensing for implementations.
This Candidate Recommendation is not expected to advance to Proposed Recommendation any earlier than 22 May 2025.
This document was produced by a group operating under the W3C Patent Policy. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.
This document is governed by the 03 November 2023 W3C Process Document.
This section is non-normative.
Modern applications often need to balance the trade offs and advantages of fully utilizing the system's computing resources, in order to provide a modern and delightful user experience.
As an example, many applications can render video effects with varying degrees of sophistication. These applications aim to provide the best user experience, while avoiding driving the user's device into a high pressure regime.
Utilization of processing units close to and often reaching 100% can lead to a bad user experience, as different tasks are fighting for the processing time. This can lead to slowless, which is especially noticeable with input delay. Further, a prolonged utilization close 100% can cause the processing units to heat up due to prolonged boosting, which can lead to throttling, resulting in an even worse user experience.
As a result of thermal limits, many smartphones, tablets and laptops can become uncomfortably hot to the touch. The fans in laptops and desktops can become so loud that they disrupt conversations or the users’ ability to focus.
In many cases, a device under high pressure appears to be unresponsive, as the operating system may fail to schedule the threads advancing the task that the user is waiting for. See also Use Cases.
This section is non-normative.
Feature detection is an established web development best practice. Resources on the topic are plentiful on- and offline and the purpose of this section is not to discuss it further, but rather to put it in the context of detecting hardware-dependent features.
Consider the below feature detection examples:
This specification defines the following concepts:
Computing devices consist of a multitude of different processing units such as the Central Processing Unit (CPU), the Graphics Processing Unit (GPU) and many specialized processing units. The latter are becoming popular such as ones designed to accelerate specific tasks like machine learning or computer vision.
The specification currently defines the valid source types as the central processing unit, also known as the CPU. Future levels of this specification MAY introduce additional source types.
WebIDLenum PressureSource
{ "cpu
" };
The PressureSource
enum represents the valid source types:
-
"
cpu
" represents the average pressure of the central processing unit across all its cores.
The requested sampling interval represents the desired interval between samples to be obtained from the hardware, expressed in milliseconds.
Interval and frequency are inverses of each other, so the requested sampling interval can also be expressed as a requested sampling rate in Hertz (cycles per second) by dividing 1000 by the requested sampling interval value.
The sampling rate for a platform collector is defined as a rate at which the user agent obtains telemetry readings from the underlying platform, and it might differ from the pressure observers' requested sampling rates. The rate is measured in Hertz (cycles per second).
The reporting rate for a pressure observer is the rate at which it runs the data collection steps, and it will never exceed the sampling rate.
The sampling rate differs from the requested sampling rate when the requested sampling rate exceeds upper or lower sampling rate bounds supported or accepted by the underlying platform and user agent†.
†The specification additionally obfuscates the rate as outlined in 11.2.2 Rate obfuscation.
In case the user didn't request a sampling rate, the sampling rate is implementation-defined.
A pressure source is an abstract, implementation-defined
interface to hardware counters or an underlying framework that provides
telemetry data about a source type
defined by PressureSource
. A pressure source can make use of data
fusion with data from additional sources if that provides more precise
results.
The telemetry data provided by a pressure source is represented in this specification as a pressure source sample, a struct consisting of the following items:
-
data: contributing factors obtained from the underlying hardware and operating system or,
in the case of a virtual pressure source, a
PressureState
. -
timestamp: the
unsafe shared current time when data was
obtained.
Note
A pressure source has an associated latest sample, a pressure source sample or null. It is initially null.
A platform collector is an abstract interface responsible for obtaining telemetry samples from a pressure source, transforming them into pressure states and providing them to the user agent.
A platform collector has the following associated data:
- an associated pressure source, which is a pressure source or null.
- an activated boolean, initially false.
The format of the telemetry data provided by a pressure source and stored in its latest sample's data is implementation-defined, and so is the process through which a platform collector transforms it into a pressure state.
For this specification's purposes, platform collectors are scoped to a global object via the platform collector mapping.
For automation purposes, a platform collector must have the ability to connect to virtual pressure sources and use their simulated data as pressure states rather than raw platform data that must be transformed into an adjusted pressure state.
As collecting telemetry data often means polling hardware counters, it is not a free operation and thus, it should not happen if there are no one observing the data. See 10.5 Life-cycle and garbage collection for more information.
A platform collector samples data at a specific rate. A user agent may modify this rate (if possible) for privacy reasons, or ignore and fuse certain readings.
It is RECOMMENDED that a user agent show some form of user-visible notification that informs the user when a pressure observer is active, as well as provides the user with the means to block the ongoing operation, or simply dismiss the notification.
The Compute Pressure API defines a policy-controlled feature
identified by the token "compute-pressure".
Its default allowlist is 'self'
.
Workers (dedicated and shared) adhere to the permission policy set by their owning document(s).
Shared workers often have multiple owning documents as they can be obtained by other documents with the same origin. In this case, all owning documents must be allowed to use the policy-controlled feature defined by this specification.
Dedicated workers can be created from other workers, in which case the permission policy of the first owning document (or owning documents, in case of a shared worker) up the owner chain will be used.
Each global object has:
- a pressure observer task queued (a boolean), which is initially false.
- a registered observer list per supported source type, which is initially empty.
- a platform collector mapping, an ordered map of source types to platform collectors.
PressureObserver
object).
The user agent has:
- a max queued records integer, which is set to an implementation-defined value, greater than 0.
-
a supported source types list of implementation-defined
PressureSource
values.
A constructed PressureObserver
object has the following internal slots:
-
a [[Callback]] of type
PressureUpdateCallback
set on creation. -
a [[PendingObservePromises]] list of zero or more source-promise tuples, initially empty,
where source holds a
PressureSource
string and promise holds aPromise
object. -
a [[QueuedRecords]] queue of zero or more
PressureRecord
objects, which is initially empty. -
a [[LastRecordMap]] ordered map of
PressureSource
to the latestPressureRecord
. -
a [[SampleIntervalMap]] ordered map of
PressureSource
to positive numbers. It represents the sample interval given source type.
For the rate obfuscation mitigation the constructed PressureObserver
object additionally
has the following internal slots:
- an [[ObservationWindow]] integer set as part of the reset observation window steps.
- a [[MaxChangesThreshold]] integer set as part of the reset observation window steps.
- a [[PenaltyDuration]] integer set as part of the reset observation window steps.
-
a [[ChangesCountMap]] ordered map, keyed on a
PressureSource
, representing the source type that triggered transition to the current pressure state. The ordered map's value is an integer representing the number of state changes in the current observation window timeframe. -
a [[AfterPenaltyRecordMap]] ordered map, keyed on a
PressureSource
, representing the source type of the lastPressureRecord
. The ordered map's value is aPressureRecord
.
Pressure states represents the minimal set of useful states that allows websites to react to changes in compute and system pressure with minimal degration in quality or service, or user experience.
WebIDLenum PressureState
{ "nominal
", "fair
", "serious
", "critical
" };
The PressureState
enum represents the pressure state with the following states:
-
"
nominal
": The conditions of the target device are at an acceptable level with no noticeable adverse effects on the user. -
"
fair
": Target device pressure, temperature and/or energy usage are slightly elevated, potentially resulting in reduced battery-life, as well as fans (or systems with fans) becoming active and audible. Apart from that the target device is running flawlessly and can take on additional work. -
"
serious
": Target device pressure, temperature and/or energy usage is consistently highly elevated. The system may be throttling as a countermeasure to reduce thermals. -
"
critical
": The temperature of the target device or system is significantly elevated and it requires cooling down to avoid any potential issues.
Contributing factors represent the underlying hardware and operation system metrics contributing to the current pressure state and can be implementation-defined.
The adjusted pressure state is a pressure state determined by an implementation-defined algorithm that takes as input source type and any other implementation-defined data from contributing factors. This algorithm MUST not be deterministic to ensure break calibration mitigation effectiveness.
The change in contributing factors is substantial steps are as follows:
- If implementation-defined low-level hardware metrics that contribute to the current pressure state drop below or exceed an, per metric, implementation-defined threshold for the current pressure state, return true.
- Return false.
10.1 The PressureUpdateCallback
callback
WebIDLcallback PressureUpdateCallback
= undefined (
sequence<PressureRecord
> changes,
PressureObserver
observer
);
This callback will be invoked when the pressure state changes.
10.2 The PressureObserver
object
The PressureObserver
can be used to observe changes in the pressure states.
WebIDL[Exposed=(DedicatedWorker,SharedWorker,Window), SecureContext]
interface PressureObserver
{
constructor
(PressureUpdateCallback
callback);
Promise<undefined> observe
(PressureSource
source, optional PressureObserverOptions
options = {});
undefined unobserve
(PressureSource
source);
undefined disconnect
();
sequence<PressureRecord
> takeRecords
();
[SameObject] static readonly attribute FrozenArray<PressureSource
> knownSources
;
};
The PressureObserver
interface represents a PressureObserver
.
The new
PressureObserver
(callback)
constructor steps are:
-
Set this.
[[Callback]]
to callback.
The observe
(source, options)
method steps are:
- Let relevantGlobal be this's relevant global object.
-
For each document in relevantGlobal's owning document set:
-
If document is not allowed to use the policy-controlled feature token "compute-pressure", return a promise rejected with
NotAllowedError
.
Note -
If document is not allowed to use the policy-controlled feature token "compute-pressure", return a promise rejected with
-
Set this.
[[SampleIntervalMap]]
[source] to options'ssampleInterval
. - Let promise be a new promise.
- Let pendingPromiseTuple be (source, promise).
-
Append pendingPromiseTuple to this.
[[PendingObservePromises]]
. -
React to promise:
-
If promise was fulfilled or rejected, then:
-
Remove tuple from this.
[[PendingObservePromises]]
.
-
Remove tuple from this.
-
If promise was fulfilled or rejected, then:
-
Run the following steps in parallel:
- Let platformCollector be null.
-
If relevantGlobal's platform collector mapping
contains source:
- Set platformCollector to relevantGlobal's platform collector mapping[source].
-
Otherwise:
- Let newCollector be a new platform collector whose associated pressure source is null.
- Let virtualPressureSource be the result of invoking get a virtual pressure source with source and relevantGlobal.
-
If virtualPressureSource is not null:
-
If virtualPressureSource's can provide samples is true:
- Set newCollector's associated pressure source to virtualPressureSource.
- Append newCollector to virtualPressureSource's connected platform collectors.
-
If virtualPressureSource's can provide samples is true:
-
Otherwise:
- Let realPressureSource be an implementation-defined pressure source that provides telemetry data about source, or null if none exists.
- Set newCollector's associated pressure source to realPressureSource.
-
If newCollector's associated pressure source is not null:
- Set platformCollector to newCollector.
- Set relevantGlobal's platform collector mapping[source] to platformCollector.
-
If platformCollector is null, queue a global task on the
PressureObserver task source given relevantGlobal to reject
promise
NotSupportedError
and abort these steps. - Invoke activate data collection with source and relevantGlobal.
-
Queue a global task on the PressureObserver task source given
relevantGlobal to run these steps:
-
If promise was rejected, run the following substeps:
- If relevantGlobal's registered observer list for source is empty, invoke deactivate data collection with source and relevantGlobal.
- Return.
- Append a new registered observer whose observer is this to relevantGlobal's registered observer list for source.
- Resolve promise.
-
If promise was rejected, run the following substeps:
- Return promise.
The unobserve
(source)
method steps are:
-
If source is not a supported source type, throw "
NotSupportedError
". -
Remove from this.
[[QueuedRecords]]
all records associated with source. -
Remove this.
[[SampleIntervalMap]]
[source]. -
Remove this.
[[LastRecordMap]]
[source]. -
Remove this.
[[AfterPenaltyRecordMap]]
[source]. -
For each (promiseSource, pendingPromise) of this.
[[PendingObservePromises]]
, if source is equal to promiseSource, reject pendingPromise with anAbortError
. - Let relevantGlobal be this's relevant global object.
- Let registeredObserverList be relevantGlobal's registered observer list for source.
- Remove any registered observer from registeredObserverList whose observer is this.
-
If registeredObserverList is empty:
- Invoke deactivate data collection with source and relevantGlobal.
- Remove relevantGlobal's platform collector mapping[source].
The disconnect
()
method steps are:
-
Empty observer.
[[QueuedRecords]]
. -
Clear this.
[[SampleIntervalMap]]
. -
Clear this.
[[LastRecordMap]]
. -
Clear this.
[[AfterPenaltyRecordMap]]
. -
For each (promiseSource, pendingPromise) of this.
[[PendingObservePromises]]
, reject pendingPromise with anAbortError
. - Let relevantGlobal be this's relevant global object.
-
For each source → registeredObserverList of
relevantGlobal's registered observer list ordered map:
- Remove any registered observer from registeredObserverList whose observer is this.
-
If registeredObserverList is empty:
- Invoke deactivate data collection with source and relevantGlobal.
- Remove relevantGlobal's platform collector mapping[source].
The takeRecords
()
method steps are:
-
Let records be a clone of observer.
[[QueuedRecords]]
. -
Empty observer.
[[QueuedRecords]]
. - Return records.
The knownSources
getter steps are:
- Return user agent's supported source types in alphabetical order.
WebIDL[Exposed=(DedicatedWorker,SharedWorker,Window), SecureContext]
interface PressureRecord
{
readonly attribute PressureSource
source
;
readonly attribute PressureState
state
;
readonly attribute DOMHighResTimeStamp time
;
[Default] object toJSON
();
};
A constructed PressureRecord
object has the following internal slots:
-
a [[Source]] value of type
PressureSource
, which represents the current source type. -
a [[State]] value of type
PressureState
, which represents the current pressure state. -
a [[Time]] value of type
DOMHighResTimeStamp
, which corresponds to the time the data was obtained from the system, relative to the time origin of the global object associated with thePressureObserver
instance that generated the notification.
The source
getter steps are to return its [[Source]]
internal slot.
The state
getter steps are to return its [[State]]
internal slot.
The time
getter steps are to return its [[Time]]
internal slot.
When PressureRecord
.toJSON
is called, run Web IDL Standard's default toJSON steps.
WebIDLdictionary PressureObserverOptions
{
[EnforceRange] unsigned long sampleInterval
= 0;
};
The sampleInterval
member represents the requested sampling interval expressed in milliseconds. In the case the value it set to 0, the system will
only call the PressureUpdateCallback
in the case there is a change to the PressureState
.
Each global object has a strong reference to registered observers in their registered observer list (one per source).
This section outlines the steps the user agent must take when implementing the specification.
The reset observation window steps given the argument observer, are as follows:
-
set observer.
[[ObservationWindow]]
to an implementation-defined randomized integer value in milliseconds within an implementation-defined range. -
set observer.
[[MaxChangesThreshold]]
to an implementation-defined randomized integer value of maximum allowed changes within the observationWindow within an implementation-defined range. -
set observer.
[[PenaltyDuration]]
to an implementation-defined randomized integer value in milliseconds, within an implementation-defined range. -
Empty the observer.
[[ChangesCountMap]]
map.
[[ObservationWindow]]
time has passed, using different randomized values.
To determine the owning document set for a relevant global object relevantGlobal:
- Let owningDocumentSet be an empty set.
-
If relevantGlobal is
Window
, then append relevantGlobal's associated document to owningDocumentSet. -
Otherwise, for each owner in
WorkerGlobalScope
relevantGlobal's owner set:-
If owner is a
Document
, then append owner to owningDocumentSet. -
If owner is a
WorkerGlobalScope
, set owningDocumentSet to the union of owningDocumentSet and owner's owning document set.
-
If owner is a
- Return owningDocumentSet.
The document has implicit focus steps given the argument document, are as follows:
- If document is not fully active, return false.
- Let relevantGlobal be document's relevant global object.
-
For each origin in
initiators of active Picture-in-Picture sessions:
- If relevantGlobal's relevant settings object's origin is same origin with origin, return true.
- If relevantGlobal's browsing context is capturing, return true.
- Let topLevelBC be relevantGlobal's browsing context's top-level browsing context.
- If topLevelBC does not have system focus, return false.
- Let focusedDocument be the topLevelBC's currently focused area's node document.
- If relevantGlobal's relevant settings object's origin is same origin with focusedDocument's origin, return true.
- Otherwise, return false.
The may receive data steps given the argument observer are as follows:
- Let relevantGlobal be observer's relevant global object.
-
If relevantGlobal is a
Window
object:- Return the result of running document has implicit focus with relevantGlobal's associated Document.
-
If relevantGlobal is a
WorkerGlobalScope
object:- Let owningDocuments be relevantGlobal's owning document set.
-
For each document in owningDocuments:
- If the result of running document has implicit focus with document is true, return true.
- Otherwise, continue.
- Return false.
-
If observer.
[[LastRecordMap]]
[source] does not exist, return true. -
Let record be observer.
[[LastRecordMap]]
[source]. -
Let sampleInterval be observer.
[[SampleIntervalMap]]
[source]. -
Let timeDeltaMilliseconds = timestamp - record.
[[Time]]
. - If timeDeltaMilliseconds ≥ sampleInterval, return true, otherwise return false.
-
If observer.
[[SampleIntervalMap]]
[source] > 0, return true. -
If observer.
[[LastRecordMap]]
[source] does not exist, return true. -
Let record be observer.
[[LastRecordMap]]
[source]. -
If record.
[[State]]
is not equal to state, return true. - Return false.
-
Increment observer.
[[ChangesCountMap]]
[source]. -
Return observer.
[[ChangesCountMap]]
[source] ≤ observer.[[MaxChangesThreshold]]
.
To get a virtual pressure source, given a source type source and relevantGlobal, perform the following steps. They return a virtual pressure source or null.
- Let topLevelTraversable be null.
-
If relevantGlobal is a
Window
object:- Set topLevelTraversable to relevantGlobal's navigable's top-level traversable.
-
If relevantGlobal is a
DedicatedWorkerGlobalScope
object:- Let owningDocuments be relevantGlobal's owning document set.
- If owningDocuments is empty, return null.
- Assert: owningDocuments's size is 1.
- Set topLevelTraversable to owningDocuments[0]'s node navigable's top-level traversable.
- If topLevelTraversable is null, return null.
- Let topLevelVirtualPressureSourceMapping be the topLevelTraversable's virtual pressure source mapping.
- Let virtualPressureSource be null.
-
If topLevelVirtualPressureSourceMapping contains source:
- Set virtualPressureSource to topLevelVirtualPressureSourceMapping[source].
- Return virtualPressureSource.
To activate data collection given a source type source and relevantGlobal, perform the following steps:
- If relevantGlobal's platform collector mapping does not contain source, abort these steps.
- Let platformCollector be relevantGlobal's platform collector mapping[source].
- If platformCollector's activated is true, abort these steps.
- Set platformCollector's activated to true.
-
In an implementation-defined manner, start running the data collection steps with relevantGlobal, source, and
platformCollector.
Note
To deactivate data collection given a source type source and relevantGlobal, perform the following steps:
- If relevantGlobal's platform collector mapping does not contain source, abort these steps.
- Let platformCollector be relevantGlobal's platform collector mapping[source].
- If platformCollector's activated is false, abort these steps.
- In an implementation-defined manner, stop running the data collection steps with relevantGlobal, source, and platformCollector.
- Set platformCollector's activated to false.
-
If platformCollector's associated pressure source is a virtual pressure source:
- Remove platformCollector from its associated pressure source's connected platform collectors.
- Otherwise, perform any implementation-defined steps to signal to platformCollector's associated pressure source to stop retrieving telemetry data.
The data collection steps given relevantGlobal, source and platformCollector are as follows:
- Let pressureSource be platformCollector's associated pressure source.
- If pressureSource is null, abort these steps.
- Let sample be pressureSource's latest sample.
- If sample is null, abort these steps.
- Let state be null.
-
If pressureSource is a virtual pressure source:
-
Set state to the
PressureState
stored in sample's data.
-
Set state to the
-
Otherwise:
- If change in contributing factors is substantial is false, abort these steps.
-
Set state to an adjusted pressure state calculated from
source and sample's data.
Note
- Assert: state is not null.
- Let rawTimestamp be sample's timestamp.
- Let timeValue be the relative high resolution time based on rawTimestamp and relevantGlobal.
-
For each observer in relevantGlobal's
registered observer list for source:
- If running may receive data with observer returns false, continue.
- If running passes rate test with observer, source and timeValue returns false, continue.
- If running should dispatch with observer, source, state returns false, continue.
-
Let record be a new
PressureRecord
object with its[[Source]]
set to source,[[State]]
set to state, and[[Time]]
set to timeValue. -
If observer.
[[AfterPenaltyRecordMap]]
[source] exists:-
Set observer.
[[AfterPenaltyRecordMap]]
[source] to record. - Continue.
-
Set observer.
-
If running passes rate obfuscation test with observer and source returns false:
-
Set observer.
[[AfterPenaltyRecordMap]]
[source] to record. -
Set observer.
[[ChangesCountMap]]
[source] to 0. -
Create timer of observer.
[[PenaltyDuration]]
duration with the following callback:-
If observer.
[[AfterPenaltyRecordMap]]
[source] exists:-
Let record be observer.
[[AfterPenaltyRecordMap]]
[source]. -
Remove observer.
[[AfterPenaltyRecordMap]]
[source]. - Run queue a record with observer, source, record.
-
Let record be observer.
-
If observer.
- Continue.
-
Set observer.
- Run queue a record with observer, source, record.
To queue a record given the arguments observer, source, record, run these steps:
-
If size of observer.
[[QueuedRecords]]
is greater than max queued records, then remove the first item. -
Append record to observer.
[[QueuedRecords]]
. -
Set observer.
[[LastRecordMap]]
[source] to record. - Queue a pressure observer task with observer's relevant global object.
The PressureObserver task source is a task source used for scheduling tasks to 10.6.5 Notify Pressure Observers.
To queue a pressure observer task given relevantGlobal as input, run these steps:
- If the relevantGlobal's pressure observer task queued is true, then return.
- Set the relevantGlobal's pressure observer task queued to true.
- Queue a global task on PressureObserver task source with relevantGlobal to notify pressure observers.
To notify pressure observers given relevantGlobal as input, run these steps:
- Set relevantGlobal's pressure observer task queued to false.
- Let notifySet be a new set of all observers in relevantGlobal’s registered observer lists.
-
For each observer of notifySet:
-
Let records be a clone of observer.
[[QueuedRecords]]
. -
Empty observer.
[[QueuedRecords]]
. -
If records is not empty, then invoke observer.
[[Callback]]
with records and observer. If this throws an exception, catch it, and report the exception.
-
Let records be a clone of observer.
10.6.6 Handling change of fully active status
This specification defines the following unloading document cleanup steps given a Document
document:
- Let relevantGlobal be document's relevant global object.
-
For each source key of relevantGlobal's
registered observer list ordered map:
- Invoke deactivate data collection with source and relevantGlobal.
- Remove relevantGlobal's platform collector mapping[source].
This specification previously included steps covering the case of a
Document
becoming fully active again (i.e. integration
with Document
's reactivate steps). Those steps have been
removed while the intended behavior is discussed.
Whenever a WorkerGlobalScope
relevantGlobal's
closing flag is set to true, perform the following
steps:
-
For each source key of relevantGlobal's
registered observer list ordered map:
- Invoke deactivate data collection with source and relevantGlobal.
- Remove relevantGlobal's platform collector mapping[source].
It may be possible to identify users across non-same origin sites if unique or very precise values can be accessed at the same time by sites not sharing origin. This attack is mitigated by 11.2.1 Data minimization, 11.2.2 Rate obfuscation, and 11.2.7 Same-origin restriction.
In computer security a covert channel creates a capability to transfer information between processes that are not supposed to be allowed to communicate. In modern multi-process web engines in the generic case each window or tab resides in its own process (documents that have the same origin or sites that have the same site typically share the same process). Using this API it may be possible to create a cross-site covert channel C where a site A on one tab first broadcasts to the channel C after having manipulated the state of the CPU. Next a site B (that is not same site with site A) on another tab reads the broadcasted data from the channel C by using this API to learn when the state of the CPU has changed. This process is repeated as long as the scripts run on both the sites A and B.
This attack is mitigated by 11.2.2 Rate obfuscation and 11.2.5 Break calibration. Implementers are advised to consider all these mitigations for long-running scripts.
Targeted de-anonymization attacks constitute a critical class of threats that jeopardize a user's anonymity. These attacks allow a malicious or partially compromised website (referred to as the “malicious site”) to ascertain whether a website visitor possesses a specific public identifier, such as an email address or a social media handle.
While anonymity may be a luxury for some, for certain individuals, it is far more than that—it is a matter of survival. Consider for instance those who engage in political protests, work as journalists covering sensitive topics, etc.
As an example, an attacker can privately share a resource with the target for instance using a public resource sharing service (“victim site”), and then measure side-effects (indicating successful access) on loading the resource via side-channels. If the logged in visitor can access the embedded resource successfully, that indicates that the current visit is indeed the intended target.
Specifically, exposing reliable information about the total CPU pressure can let an attacking site understand if a target of a cross-origin navigation (e.g. an iframe or pop-up window from another site) performed a CPU-intensive operation.
Techniques such as pop-under and tab-under can be used to hide the loading from the user.
One possible attack is that the malicious website opens e.g., a popup to a resource on a victim site to which the user is logged in (e.g. a video streaming site or online document editor) pointing to a resource shared with specific users.
Assuming that loading the resource puts increased pressure on the CPU, this would create a side-channel reveals to the attacking site if the user is logged into an account with access to the resource, deanonymizing the user.
Given that modern CPUs recover quickly from high pressure, one possible mitigation strategy could be to temporarily disable readings for a few seconds after loading popup and iframe content.
This specification adheres to the generic data minimization principles to limit exposure of data related to low-level details of the underlying platform to the minimum required to address its high-value use cases. This includes consideration for limiting exposure of identifying information about devices.
The specific application of data minimization principles in the context of this specification are discussed in 11.2.2 Rate obfuscation and 11.2.7 Same-origin restriction.
The specification requires implementing the rate obfuscation mitigation to keep track of the number of pressure changes over an implementation-defined sliding observation window and set a flag if an implementation-defined threshold for the number of pressure changes is exceeded. Similarly, it is also recommended for the implementation to observe any abnormal activity such as a high number of pressure state changes spanning across multiple states, and set this flag similarly.
If this flag is set, the implementation is recommended to give the pressure observer a penalty during which it will not be able to inform scripts of changes in its pressure state as it normally would. The duration of this penalty is implementation-defined and it is recommended to be randomized. When notify pressure observers resumes operation after the penalty, it only reports the latest pressure state and disregards any interim state information received from the platform collector during this penalty.
Based on implementation experience, implementers must use:
-
a range in between 50 and 100 changes for PressureObserver's
[[MaxChangesThreshold]]
internal slot. -
a range in between 5000 milliseconds and 10000 milliseconds for PressureObserver's
[[PenaltyDuration]]
internal slot.
This section is non-normative.
Based on implementation experience, implementers are advised to use:
-
a range in between 300000 milliseconds (5 minutes) and 600000 milliseconds (10 minutes) for PressureObserver's
[[ObservationWindow]]
internal slot.
In a calibration process an attacker tries to manipulate the CPU so that this API would report a transition into a certain pressure state with the highest probability in response to the pressure exerted by the fabricated workload. This break calibration mitigation solution can slow down or prevent this calibration process from succeeding by slightly changing at runtime the implementation-defined low-level hardware metrics that contribute to these pressure state transitions. Even if the initial calibration would succeed, its results will be invalidated at runtime when this mitigation is running continuously. Any attempts to recalibrate will similarly be mitigated against.
This section is non-normative.
Based on implementation experience, implementers are advised to apply the mitigation to a randomized time value within a range between 120000 milliseconds (2 minutes) and 240000 milliseconds (4 minutes).
By default data delivery is restricted to documents served from the same-origin as an initiator of an active picture-in-picture-session, documents capturing or the document with system focus, if any.
The documents qualifying for data delivery, under the above rules, can delegate it to documents in child navigables.
The feature can be extended to third-party contexts such as iframes only by a declared policy.
Shared workers can be shared across documents, such as top level document and those associated iframes. If one of the documents in the owner set passes the above data delivery requirements, the shared worker will qualify for data delivery. This means that the embedded iframe is able to pass along the data to the embedding document.
The Compute Pressure API is focused on improving the user experience. There are two ways in which applications that build on the API can positively impact accessibility.
- Considering users' access needs when making decisions based on information gathered using the API.
- Designing and making user interfaces based on information gained from the API with accessibility in mind.
As a consumer of the API, it's important to consider both of these opportunities. Here are some examples:
- Decision: In a video conferencing scenario, there may be multiple video streams. The system may determines that it needs to drop certain streams in order to conserve resources. If one of the video streams comes from a sign language interpreter, then that stream must be prioritized over others, so that the user can still understand the conversation. In practice, this could be simply implemented by allowing the user to "pin" a certain stream, and ensuring that that pinned stream is never automatically dropped by the system.
-
User Interface:
- A simple load-level meter, in which the current usage level bucket is indicated on the screen. This information must be conveyed using more than just color, so that people who cannot perceive color can still perceive the information. A symbol could be used in conjunction with color. Text could also be used in conjunction with both shape and color.
- Some applications may present a notification to the user when some functionality is restricted due to compute pressure. These notifications may take the form of "toast" messages, in which case care must be taken to ensure that people using assistive technologies (including screen readers) can be made aware of the notification, and dismiss it, without unduly interrupting their workflow.
The Compute Pressure API poses a challenge to test authors, as fully exercising interface requires physical hardware devices that respond in predictable ways.
To address this challenge this document defines a [WEBDRIVER2] extension commands that allows defining and controlling virtual pressure sources that behave like real ones and which can have particular properties and whose readings can be entirely defined by users.
A virtual pressure source is a pressure source that simulates the behavior of a real one in controlled ways. It reports pressure changes to zero or more platform collectors connected to it.
Contrary to a real pressure source, however, it reports pressure state values directly instead of implementation-defined values that
must be processed into pressure states by a platform collector. In
other words, a virtual pressure source's pressure source sample's
data is a PressureState
.
In addition to the data associated with all pressure sources (such as pressure source sample), each virtual pressure source has:
- a can provide samples boolean.
- a connected platform collectors set of platform collectors.
Each top-level traversable has a virtual pressure source mapping, which is an ordered map of source types to virtual pressure source.
HTTP Method | URI Template |
---|---|
POST | /session/{session id}/pressuresource |
This extension command creates a new virtual pressure source of a specified
source type. Calls to observe
()
from PressureObserver
instances
of the same source type will cause this virtual pressure source to be used as their
backing pressure source until 13.1.1.2
Delete virtual pressure source is run.
Parameter name | Value type | Required |
---|---|---|
type | String | yes |
supported | Boolean | no |
The remote end steps given session, URL variables and parameters are:
- Let virtualPressureSourceType be the result of invoking get a property "type" from parameters.
- If the user agent's supported source types does not contain virtualPressureSourceType, return error with WebDriver error code invalid argument.
- Let topLevelTraversable be the current browsing context's top-level traversable.
- Let topLevelVirtualPressureSourceMapping be the topLevelTraversable's virtual pressure source mapping.
- If topLevelVirtualPressureSourceMapping contains virtualPressureSourceType, return error with WebDriver error code invalid argument.
- Let supported be the result of invoking get a property with default with "supported" and true from parameters.
- Let virtualPressureSource be a new virtual pressure source.
- Set virtualPressureSource's can provide samples to supported.
- Set topLevelVirtualPressureSourceMapping[virtualPressureSourceType] to virtualPressureSource.
- Return success with data null.
HTTP Method | URI Template |
---|---|
DELETE | /session/{session id}/pressuresource/{type} |
This extension command deletes a given virtual pressure source, meaning that, if available, data for the given source type will be delivered the regular way, by non-virtual means.
The remote end steps given session, URL variables and parameters are:
- Let virtualPressureSourceType be the value of the URL variables["type"].
- If the user agent's supported source types does not contain virtualPressureSourceType, return error with WebDriver error code invalid argument.
- Let topLevelTraversable be the current browsing context's top-level traversable.
- Let topLevelVirtualPressureSourceMapping be the topLevelTraversable's virtual pressure source mapping.
- Let pressureSource be topLevelVirtualPressureSourceMapping[virtualPressureSourceType].
-
For each platformCollector of pressureSource's connected platform collectors:
- Set platformCollector's associated pressure source to null.
- Remove topLevelVirtualPressureSourceMapping[virtualPressureSourceType].
- Return success with data null.
HTTP Method | URI Template |
---|---|
POST | /session/{session id}/pressuresource/{type} |
This extension command allows updating the state of a virtual pressure source by pushing a new pressure source sample.
Parameter name | Value type | Required |
---|---|---|
sample |
PressureState
|
yes |
The remote end steps given session, URL variables and parameters are:
- Let virtualPressureSourceType be the value of the URL variables["type"].
- If the user agent's supported source types does not contain virtualPressureSourceType, return error with WebDriver error code invalid argument.
- Let topLevelTraversable be the current browsing context's top-level traversable.
- Let topLevelVirtualPressureSourceMapping be the topLevelTraversable's virtual pressure source mapping.
- If topLevelVirtualPressureSourceMapping does not contain virtualPressureSource, return error with WebDriver error code unsupported operation.
- Let virtualPressureSource be topLevelVirtualPressureSourceMapping[virtualPressureSourceType].
- Let sample be the result of invoking get a property "sample" from parameters.
-
If sample is not of type
PressureState
, return error with WebDriver error code invalid argument. - Set virtualPressureSource's latest sample to a new pressure source sample whose data is sample and timestamp is the unsafe shared current time.
- In an implementation-defined way, make virtualPressureSource's latest sample available to virtualPressureSource's connected platform collectors.
- Return success with data null.
This section is non-normative.
const samples = [];
function pressureChange(records, observer) {
for (const record of records) {
samples.push(record.state);
// We only want 20 samples.
if (samples.length == 20) {
observer.disconnect();
return;
}
}
}
const observer = new PressureObserver(pressureChange);
observer.observe("cpu");
In the following example we want to lower the number of concurrent video streams when the pressure becomes critical. For the sake of simplicity we only consider this one state.
As lowering the amount of streams might not result in exiting the critical state, or at least not immediately, we use a strategy where we lower one stream at the time every 30 seconds while still in the critical state.
We accomplish this by making sure the callback is called at least once every 30 seconds, or when the state actually changes. When the state changes we reset the interval timer.
let timerId = -1;
function pressureChange(records) {
// Clear timer every time we are called, either by an actual state change,
// or when called by setTimeout (see below).
if (timerId > 0) {
clearTimeout(timerId);
}
// When entering critical state, we want to recheck every 30sec if we are
// still in critical state and if so, further reduce our concurrent streams.
// For this reason we create a timer for 30 seconds that will call us back
// with the last result in there were no change.
const lastRecordArray = [records.at(records.length - 1)];
timerId = setTimeout(pressureChange.bind(this, lastRecordArray), 30_000);
for (const record of records) {
if (record.state == "critical") {
let streamsCount = getStreamsCount();
setStreamsCount(streamsCount--);
}
}
}
const observer = new PressureObserver(pressureChange);
observer.observe("cpu");
In the following example, we want to demonstrate the usage of takeRecords
()
,
by retrieving the remaining records accumulated since the the callback was last
invoked.
It is recommended to do so before disconnect
()
,
otherwise disconnect
()
will clear them and they will be lost forever.
For example, we might want to measure the pressure during a benchmarking workload, and thus want pressure telemetry for the exact duration of the workload. This means disconnecting all observers immediately when the task is completed, and manually requesting any pending pressure telemetry up to this point that might not have been delivered yet as part of the event loop cycle.
function logWorkloadStatistics(records) {
// do something with records.
}
const observer = new PressureObserver(logWorkloadStatistics);
observer.observe("cpu");
// Read pending state change records, otherwise they will be cleared
// when we disconnect.
const records = observer.takeRecords();
logWorkloadStatistics(records);
observer.disconnect();
In the following example, we show how to tell the observer to stop watching a specific
source by invoking unobserve
()
with source.
const observer = new PressureObserver(records => { /* do something with records. */ });
observer.observe("cpu");
observer.observe("gpu");
// Callback now gets called whenever the pressure state changes for 'cpu' or 'gpu'.
observer.unobserve("gpu");
// Callback now only gets called whenever the pressure state changes for 'cpu'.
In the following example, we show how to tell the observer to stop watching for any
state changes by calling disconnect
()
. Calling
disconnect
()
will stop observing all sources observed
by previous observe
()
calls.
Additionally it will clear all pending records collected since the last callback was invoked.
const observer = new PressureObserver(records => { // do something with records. });
observer.observe("cpu");
observer.observe("gpu");
// some time later...
observer.disconnect();
// records will be an empty array, because of the previous disconnect().
const records = observer.takeRecords();
As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.
The key words MAY, MUST, and RECOMMENDED in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.
This specification defines conformance criteria for a single product: a user agent that implements the interfaces that it contains.
This section is non-normative.
Many thanks for valuable feedback and advice from Anssi Kostiainen, Asaf Yaffe, Benjamin VanderSloot, Chen Xing, Evan Shrubsole, Florian Scholz, François Beaufort, Jan Gora, Jesse Barnes, Joshua Bell, Kamila Hasanbega, Matt Menke, Moh Haghighat, Nicolás Peña Moreno, Opal Voravootivat, Paul Jensen, Peter Djeu, Reilly Grant, Ulan Degenbaev, Victor Miura, Wei Wang, and Zhenyao Mo
Thanks to the W3C Privacy Interest Group (PING) and especially Peter Snyder for the privacy review, feedback and the proposed cross-site covert channel attack and its mitigations. Similarly thanks to Ehsan Toreini for his work on the privacy of private browsing and related contributions to this specification.
Special thanks to Amanda Zhao, Fidel Tian, Zhiliang Wang and others from the Zoom engineering team for the feedback and hands-on experiments that have helped improve this API in real-world scenarios.
This section is non-normative.
B.1 Changes since the First Public Working Draft (2022/12/20)
- Remove the limiting of rate as it is replace by obfuscation (PR #302)
- Move at-risk to experimental on PressureSource/thermals (PR #300)
- Make thermal pressure source at-risk (PR #293)
- Get rid of the global current pressure state (PR #292)
- Add an Automation section with WebDriver support to the spec (PR #284)
- Make PressureObserver.observe() and data delivery algorithm less vague (PR #283)
- data delivery: Set timestamp as an "unsafe shared current time" (PR #280)
- Rework handling of fully active status (PR #276)
- timestamp: Redefine timestamp in Data delivery (PR #274)
- Rename supportedSources to knownSources (PR #268)
- Associate sample interval with source (PR #263)
- Move options to observe() (PR #261)
- Change sampleRate to sampleInterval (PR #254)
- Provide guidelines for mitigation algorithms (PR #241)
- Require all owning documents to have permission policy enabled (PR #239)
- Support workers in privacy algos (PR #238)
- Use same origin checks instead of same origin-domain ones (PR #236)
- Fix penalty algorithm (PR #230)
- Fix definition of ChangesCountMap (PR #227)
- Break calibration (PR #225)
- Add rate obfuscation test requirement (PR #223)
- Do not expose contributing factors (PR #203)
- Introduce 'thermals' source type (PR #202)
- Adjust pressure states and add new explorations as a result (PR #192)
- Privacy check: Remove ordered list between worker and window (PR #191)
- Add an implementation-defined change threshold exceeded check (PR #180)
- Add toJSON for PressureRecord, and fix spec link issues (PR #175)
- activate data collection §10.6.2
- activated §4.
- adjusted pressure state §9.
-
[[AfterPenaltyRecordMap]]
internal slot forPressureObserver
§7. - associated pressure source §4.
- break calibration §11.2.5
-
[[Callback]]
internal slot forPressureObserver
§7. - can provide samples §13.1
- change in contributing factors is substantial §9.
-
[[ChangesCountMap]]
internal slot forPressureObserver
§7. - connected platform collectors §13.1
-
constructor()
forPressureObserver
§10.2.1 - Contributing factors §9.
-
"cpu"
enum value forPressureSource
§3.2 -
"critical"
enum value forPressureState
§8. - data §4.
- data collection §10.6.2
- deactivate data collection §10.6.2
-
disconnect()
method forPressureObserver
§10.2.4 - document has implicit focus §10.6.1
-
"fair"
enum value forPressureState
§8. - get a virtual pressure source §10.6.1
-
knownSources
attribute forPressureObserver
§10.2.6 -
[[LastRecordMap]]
internal slot forPressureObserver
§7. - latest sample §4.
- max queued records §7.
-
[[MaxChangesThreshold]]
internal slot forPressureObserver
§7. - may receive data §10.6.1
-
"nominal"
enum value forPressureState
§8. - notify pressure observers §10.6.5
-
[[ObservationWindow]]
internal slot forPressureObserver
§7. -
observe()
method forPressureObserver
§10.2.2 - observer §7.
- owning document set §10.6.1
- passes rate obfuscation test §10.6.1
- passes rate test §10.6.1
-
[[PenaltyDuration]]
internal slot forPressureObserver
§7. -
[[PendingObservePromises]]
internal slot forPressureObserver
§7. - platform collector §4.
- platform collector mapping §7.
- pressure observer task queued §7.
- pressure source §4.
- pressure source sample §4.
- Pressure states §8.
-
PressureObserver
interface §10.2 - PressureObserver task source §10.6.4
-
PressureObserverOptions
dictionary §10.4 -
PressureRecord
interface §10.3 -
PressureSource
enum §3.2 -
PressureState
enum §8. -
PressureUpdateCallback
§10.1 - processing units §3.1
- queue a pressure observer task §10.6.4
- queue a record §10.6.3
-
[[QueuedRecords]]
internal slot forPressureObserver
§7. - rate obfuscation §11.2.2
- registered observer §7.
- registered observer list §7.
- reporting rate §3.3
- requested sampling interval §3.3
- requested sampling rate §3.3
- reset observation window §10.6.1
-
sampleInterval
member forPressureObserverOptions
§10.4.1 -
[[SampleIntervalMap]]
internal slot forPressureObserver
§7. - sampling rate §3.3
-
"serious"
enum value forPressureState
§8. - should dispatch §10.6.1
-
source
attribute forPressureRecord
§10.3.1 - source type §4.
-
[[Source]]
internal slot forPressureRecord
§10.3 -
state
attribute forPressureRecord
§10.3.2 -
[[State]]
internal slot forPressureRecord
§10.3 - supported source types §7.
-
takeRecords()
method forPressureObserver
§10.2.5 -
time
attribute forPressureRecord
§10.3.3 -
[[Time]]
internal slot forPressureRecord
§10.3 - timestamp §4.
-
toJSON
method forPressureRecord
§10.3.4 -
unobserve()
method forPressureObserver
§10.2.3 - user agent §15.
- valid source types §3.2
- virtual pressure source §13.1
- virtual pressure source mapping §13.1
-
[DOM] defines the following:
-
Document
interface - documents
- node
-
node document (for
Node
)
-
-
[ECMASCRIPT] defines the following:
-
agent (for
ECMAScript
) -
globalThis
attribute (forglobalThis
)
-
agent (for
-
[HR-TIME] defines the following:
-
DOMHighResTimeStamp
- relative high resolution time
- unsafe current time (for monotonic clock)
- unsafe shared current time
-
-
[HTML] defines the following:
- allowed to use
- associated document
- browsing context
- child navigables
-
closing (for
WorkerGlobalScope
) -
DedicatedWorkerGlobalScope
interface -
fully active (for
Document
) - global object
-
iframes
element - in parallel
-
navigable (for
Window
) - node navigable
- origin
-
owner set (for
WorkerGlobalScope
) -
policy container (for
WorkerGlobalScope
) - queue a global task
-
reactivate (for
Document
) - relevant global object
- relevant settings object
- report the exception
- same origin
- same site
- system focus (for top-level traversable)
- task source
- time origin (for environment settings object)
- top-level browsing context
- top-level traversable
- top-level traversable (for browsing context)
- unloading document cleanup steps
-
Window
interface -
WorkerGlobalScope
interface
-
[INFRA] defines the following:
-
Append (for
list
) -
Append (for
set
) - Assert
-
Clear (for
map
) -
clone (for
list
) -
contain (for
list
) -
contains (for
map
) -
continue (for
iteration
) -
empty (for
list
) -
For each (for
list
) -
For each (for
map
) - implementation-defined
-
item (for
list
) -
items (for
struct
) -
keyed (for
map
) - list
- ordered map
- queue
-
Remove (for
list
) -
Remove (for
map
) - set
-
size (for
list
) - struct
- tuples
-
union (for
set
) -
value (for
map
)
-
Append (for
-
[MEDIACAPTURE-STREAMS] defines the following:
- context is capturing
-
[PERMISSIONS-POLICY] defines the following:
- default allowlist (for policy-controlled feature)
- policy-controlled feature
-
[WEBDRIVER2] defines the following:
- current browsing context
- error
- error code
- extension command URI Template
- extension commands
- get a property
- get a property with default
- invalid argument
- remote end steps
- success
- unsupported operation
-
[WEBIDL] defines the following:
- a new promise
- a promise rejected with
-
AbortError
exception -
[Default]
extended attribute - default toJSON steps
-
[EnforceRange]
extended attribute -
[Exposed]
extended attribute -
FrozenArray
interface - getter steps
-
NotAllowedError
exception -
NotSupportedError
exception -
object
type -
Promise
interface -
React (for
promise
) - rejected
- resolved
-
[SameObject]
extended attribute -
[SecureContext]
extended attribute - sequence
- this
-
TypeError
exception -
undefined
type -
unsigned long
type
WebIDLenum PressureSource
{ "cpu
" };
enum PressureState
{ "nominal
", "fair
", "serious
", "critical
" };
callback PressureUpdateCallback
= undefined (
sequence<PressureRecord
> changes,
PressureObserver
observer
);
[Exposed=(DedicatedWorker,SharedWorker,Window), SecureContext]
interface PressureObserver
{
constructor
(PressureUpdateCallback
callback);
Promise<undefined> observe
(PressureSource
source, optional PressureObserverOptions
options = {});
undefined unobserve
(PressureSource
source);
undefined disconnect
();
sequence<PressureRecord
> takeRecords
();
[SameObject] static readonly attribute FrozenArray<PressureSource
> knownSources
;
};
[Exposed=(DedicatedWorker,SharedWorker,Window), SecureContext]
interface PressureRecord
{
readonly attribute PressureSource
source
;
readonly attribute PressureState
state
;
readonly attribute DOMHighResTimeStamp time
;
[Default] object toJSON
();
};
dictionary PressureObserverOptions
{
[EnforceRange] unsigned long sampleInterval
= 0;
};
- [dom]
- DOM Standard. Anne van Kesteren. WHATWG. Living Standard. URL: https://dom.spec.whatwg.org/
- [hr-time]
- High Resolution Time. Yoav Weiss. W3C. 7 November 2024. W3C Working Draft. URL: https://www.w3.org/TR/hr-time-3/
- [html]
- HTML Standard. Anne van Kesteren; Domenic Denicola; Dominic Farolino; Ian Hickson; Philip Jägenstedt; Simon Pieters. WHATWG. Living Standard. URL: https://html.spec.whatwg.org/multipage/
- [infra]
- Infra Standard. Anne van Kesteren; Domenic Denicola. WHATWG. Living Standard. URL: https://infra.spec.whatwg.org/
- [mediacapture-streams]
- Media Capture and Streams. Cullen Jennings; Bernard Aboba; Jan-Ivar Bruaroey; Henrik Boström; youenn fablet. W3C. 19 December 2024. CRD. URL: https://www.w3.org/TR/mediacapture-streams/
- [PERMISSIONS-POLICY]
- Permissions Policy. Ian Clelland. W3C. 10 February 2025. W3C Working Draft. URL: https://www.w3.org/TR/permissions-policy-1/
- [RFC2119]
- Key words for use in RFCs to Indicate Requirement Levels. S. Bradner. IETF. March 1997. Best Current Practice. URL: https://www.rfc-editor.org/rfc/rfc2119
- [RFC8174]
- Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words. B. Leiba. IETF. May 2017. Best Current Practice. URL: https://www.rfc-editor.org/rfc/rfc8174
- [WEBDRIVER2]
- WebDriver. Simon Stewart; David Burns. W3C. 6 March 2025. W3C Working Draft. URL: https://www.w3.org/TR/webdriver2/
- [WEBIDL]
- Web IDL Standard. Edgar Chen; Timothy Gu. WHATWG. Living Standard. URL: https://webidl.spec.whatwg.org/
- [ECMAScript]
- ECMAScript Language Specification. Ecma International. URL: https://tc39.es/ecma262/multipage/
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
- § 3.2 Pressure sources (2) (3) (4)
- § 7. Internal Slot Definitions (2) (3) (4)
- § 9. Contributing Factors
- § 10.2.6 The knownSources attribute
- § 10.3 The PressureRecord interface
- § 10.6.1 Supporting algorithms
- § 10.6.2 Data Collection and Delivery (2)
- § 13.1 Virtual Pressure Source (2) (3)
- § 13.1.1.1 Create virtual pressure source (2)
- § 13.1.1.2 Delete virtual pressure source
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
- § 10.2.2 The observe() method (2)
- § 10.2.3 The unobserve() method
- § 10.2.4 The disconnect() method
- § 10.5 Life-cycle and garbage collection (2)
- § 10.6.2 Data Collection and Delivery
- § 10.6.5 Notify Pressure Observers
- § 10.6.6 Handling change of fully active status
- § 10.6.7 Handling changes to worker status
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
- § 4. Platform primitives (2) (3)
- § 7. Internal Slot Definitions
- § 8. Pressure States (2)
- § 9. Contributing Factors (2) (3) (4) (5)
- § 10.1 The PressureUpdateCallback callback
- § 10.2 The PressureObserver object
- § 10.3 The PressureRecord interface
- § 10.6.2 Data Collection and Delivery
- § 13.1 Virtual Pressure Source (2)
Referenced in:
Referenced in:
Referenced in:
- § 2. A Note on Feature Detection
- § 3.3 Sampling and Reporting Rate (2)
- § 7. Internal Slot Definitions (2) (3)
- § 10.1 The PressureUpdateCallback callback
- § 10.2 The PressureObserver object (2) (3) (4)
- § 10.2.1 The constructor() method
- § 10.3 The PressureRecord interface
- § 10.5 Life-cycle and garbage collection (2) (3)
- § 13.1 Virtual Pressure Source
- § 13.1.1.1 Create virtual pressure source
- § B.3 IDL Index (2)
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
- § 2. A Note on Feature Detection
- § 3.2 Pressure sources (2)
- § 3.3 Sampling and Reporting Rate (2) (3)
- § 4. Platform primitives (2)
- § 5. User notifications
- § 7. Internal Slot Definitions
- § 9. Contributing Factors
- § 10.2.6 The knownSources attribute (2)
- § 10.4.1 The sampleInterval member
- § 13.1.1.1 Create virtual pressure source
- § 13.1.1.2 Delete virtual pressure source
- § 13.1.1.3 Update virtual pressure source
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
- § 10.2.2 The observe() method
- § 10.2.3 The unobserve() method
- § 10.2.4 The disconnect() method
- § 10.6.1 Supporting algorithms (2) (3)
- § 10.6.2 Data Collection and Delivery
- § 10.6.5 Notify Pressure Observers
- § 10.6.6 Handling change of fully active status
- § 10.6.7 Handling changes to worker status
- § 13.1.1.2 Delete virtual pressure source
Referenced in:
- § 3.3 Sampling and Reporting Rate
- § 4. Platform primitives (2)
- § 7. Internal Slot Definitions (2)
- § 9. Contributing Factors (2) (3) (4) (5)
- § 10.2.2 The observe() method
- § 10.6.1 Supporting algorithms (2) (3) (4) (5) (6)
- § 10.6.2 Data Collection and Delivery (2) (3) (4)
- § 11.2.2 Rate obfuscation (2) (3)
- § 11.2.5 Break calibration (2)
- § 13.1 Virtual Pressure Source
- § 13.1.1.3 Update virtual pressure source
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in: