From 0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:47:29 +0200 Subject: Adding upstream version 115.8.0esr. Signed-off-by: Daniel Baumann --- .../tests/interfaces/compute-pressure.idl | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 testing/web-platform/tests/interfaces/compute-pressure.idl (limited to 'testing/web-platform/tests/interfaces/compute-pressure.idl') diff --git a/testing/web-platform/tests/interfaces/compute-pressure.idl b/testing/web-platform/tests/interfaces/compute-pressure.idl new file mode 100644 index 0000000000..3e35dc4ee2 --- /dev/null +++ b/testing/web-platform/tests/interfaces/compute-pressure.idl @@ -0,0 +1,37 @@ +// 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 PressureSource { "thermals", "cpu" }; + +enum PressureState { "nominal", "fair", "serious", "critical" }; + +callback PressureUpdateCallback = undefined ( + sequence changes, + PressureObserver observer +); + +[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 DOMHighResTimeStamp time; + [Default] object toJSON(); +}; + +dictionary PressureObserverOptions { + double sampleRate = 1.0; +}; -- cgit v1.2.3