// GENERATED CONTENT - DO NOT EDIT // Content was automatically extracted by Reffy into webref // (https://github.com/w3c/webref) // Source: Compute Pressure Level 1 (https://w3c.github.io/compute-pressure/) enum PressureState { "nominal", "fair", "serious", "critical" }; enum PressureFactor { "thermal", "power-supply" }; callback PressureUpdateCallback = undefined ( sequence changes, PressureObserver observer ); enum PressureSource { "cpu" }; [Exposed=(DedicatedWorker,SharedWorker,Window), SecureContext] interface PressureObserver { constructor(PressureUpdateCallback callback, optional PressureObserverOptions options = {}); Promise observe(PressureSource source); undefined unobserve(PressureSource source); undefined disconnect(); sequence takeRecords(); [SameObject] static readonly attribute FrozenArray supportedSources; }; [Exposed=(DedicatedWorker,SharedWorker,Window), SecureContext] interface PressureRecord { readonly attribute PressureSource source; readonly attribute PressureState state; readonly attribute FrozenArray factors; readonly attribute DOMHighResTimeStamp time; }; dictionary PressureObserverOptions { double sampleRate = 1.0; };