@webref/idl 3.1.1 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,30 +3,34 @@
3
3
  // (https://github.com/w3c/webref)
4
4
  // Source: Compute Pressure API (https://wicg.github.io/compute-pressure/)
5
5
 
6
+ enum PressureState { "nominal", "fair", "serious", "critical" };
7
+
6
8
  callback ComputePressureUpdateCallback = undefined (
7
- ComputePressureEntry update,
9
+ sequence<ComputePressureRecord> changes,
8
10
  ComputePressureObserver observer
9
11
  );
10
12
 
11
13
  enum ComputePressureTarget { "cpu" };
12
14
 
13
- [Exposed=Window]
15
+ [Exposed=(DedicatedWorker,SharedWorker,Window), SecureContext]
14
16
  interface ComputePressureObserver {
15
17
  constructor(ComputePressureUpdateCallback callback);
18
+
16
19
  undefined observe(ComputePressureTarget target, optional ComputePressureObserverOptions options = {});
17
20
  undefined unobserve(ComputePressureTarget target);
18
21
  undefined disconnect();
19
- sequence<ComputePressureEntry> takeRecords();
22
+ sequence<ComputePressureRecord> takeRecords();
23
+
20
24
  [SameObject] static readonly attribute FrozenArray<DOMString> supportedTargetTypes;
25
+
26
+ [Exposed=Window] static Promise<PermissionState> requestPermission();
21
27
  };
22
28
 
23
- dictionary ComputePressureEntry {
24
- double cpuSpeed;
25
- double cpuUtilization;
29
+ dictionary ComputePressureRecord {
30
+ PressureState state;
26
31
  ComputePressureObserverOptions options;
27
32
  };
28
33
 
29
34
  dictionary ComputePressureObserverOptions {
30
- sequence<double> cpuUtilizationThresholds = [];
31
- sequence<double> cpuSpeedThresholds = [];
35
+ // For future-proofing - expect things to be added here later.
32
36
  };
@@ -0,0 +1,8 @@
1
+ // GENERATED CONTENT - DO NOT EDIT
2
+ // Content was automatically extracted by Reffy into webref
3
+ // (https://github.com/w3c/webref)
4
+ // Source: CSS Containment Module Level 3 (https://drafts.csswg.org/css-contain-3/)
5
+
6
+ [Exposed=Window]
7
+ interface CSSContainerRule : CSSConditionRule {
8
+ };
package/dom.idl CHANGED
@@ -94,7 +94,7 @@ interface AbortController {
94
94
  [Exposed=*]
95
95
  interface AbortSignal : EventTarget {
96
96
  [NewObject] static AbortSignal abort(optional any reason);
97
- [NewObject] static AbortSignal timeout([EnforceRange] unsigned long long milliseconds);
97
+ [Exposed=(Window,Worker), NewObject] static AbortSignal timeout([EnforceRange] unsigned long long milliseconds);
98
98
 
99
99
  readonly attribute boolean aborted;
100
100
  readonly attribute any reason;
package/html.idl CHANGED
@@ -201,6 +201,7 @@ interface HTMLLinkElement : HTMLElement {
201
201
  [CEReactions] attribute USVString imageSrcset;
202
202
  [CEReactions] attribute DOMString imageSizes;
203
203
  [CEReactions] attribute DOMString referrerPolicy;
204
+ [SameObject, PutForwards=value] readonly attribute DOMTokenList blocking;
204
205
  [CEReactions] attribute boolean disabled;
205
206
 
206
207
  // also has obsolete members
@@ -224,6 +225,7 @@ interface HTMLStyleElement : HTMLElement {
224
225
  [HTMLConstructor] constructor();
225
226
 
226
227
  [CEReactions] attribute DOMString media;
228
+ [SameObject, PutForwards=value] readonly attribute DOMTokenList blocking;
227
229
 
228
230
  // also has obsolete members
229
231
  };
@@ -1221,6 +1223,7 @@ interface HTMLScriptElement : HTMLElement {
1221
1223
  [CEReactions] attribute DOMString text;
1222
1224
  [CEReactions] attribute DOMString integrity;
1223
1225
  [CEReactions] attribute DOMString referrerPolicy;
1226
+ [SameObject, PutForwards=value] readonly attribute DOMTokenList blocking;
1224
1227
 
1225
1228
  static boolean supports(DOMString type);
1226
1229
 
@@ -1338,7 +1341,7 @@ interface mixin CanvasTransform {
1338
1341
  interface mixin CanvasCompositing {
1339
1342
  // compositing
1340
1343
  attribute unrestricted double globalAlpha; // (default 1.0)
1341
- attribute DOMString globalCompositeOperation; // (default source-over)
1344
+ attribute DOMString globalCompositeOperation; // (default "source-over")
1342
1345
  };
1343
1346
 
1344
1347
  interface mixin CanvasImageSmoothing {
@@ -1477,7 +1480,7 @@ interface mixin CanvasPath {
1477
1480
  undefined bezierCurveTo(unrestricted double cp1x, unrestricted double cp1y, unrestricted double cp2x, unrestricted double cp2y, unrestricted double x, unrestricted double y);
1478
1481
  undefined arcTo(unrestricted double x1, unrestricted double y1, unrestricted double x2, unrestricted double y2, unrestricted double radius);
1479
1482
  undefined rect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h);
1480
- undefined roundRect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h, sequence<(unrestricted double or DOMPointInit)> radii);
1483
+ undefined roundRect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h, optional (unrestricted double or DOMPointInit or sequence<(unrestricted double or DOMPointInit)>) radii = {});
1481
1484
  undefined arc(unrestricted double x, unrestricted double y, unrestricted double radius, unrestricted double startAngle, unrestricted double endAngle, optional boolean counterclockwise = false);
1482
1485
  undefined ellipse(unrestricted double x, unrestricted double y, unrestricted double radiusX, unrestricted double radiusY, unrestricted double rotation, unrestricted double startAngle, unrestricted double endAngle, optional boolean counterclockwise = false);
1483
1486
  };
@@ -2205,53 +2208,6 @@ dictionary EventSourceInit {
2205
2208
  boolean withCredentials = false;
2206
2209
  };
2207
2210
 
2208
- enum BinaryType { "blob", "arraybuffer" };
2209
- [Exposed=(Window,Worker)]
2210
- interface WebSocket : EventTarget {
2211
- constructor(USVString url, optional (DOMString or sequence<DOMString>) protocols = []);
2212
-
2213
- readonly attribute USVString url;
2214
-
2215
- // ready state
2216
- const unsigned short CONNECTING = 0;
2217
- const unsigned short OPEN = 1;
2218
- const unsigned short CLOSING = 2;
2219
- const unsigned short CLOSED = 3;
2220
- readonly attribute unsigned short readyState;
2221
- readonly attribute unsigned long long bufferedAmount;
2222
-
2223
- // networking
2224
- attribute EventHandler onopen;
2225
- attribute EventHandler onerror;
2226
- attribute EventHandler onclose;
2227
- readonly attribute DOMString extensions;
2228
- readonly attribute DOMString protocol;
2229
- undefined close(optional [Clamp] unsigned short code, optional USVString reason);
2230
-
2231
- // messaging
2232
- attribute EventHandler onmessage;
2233
- attribute BinaryType binaryType;
2234
- undefined send(USVString data);
2235
- undefined send(Blob data);
2236
- undefined send(ArrayBuffer data);
2237
- undefined send(ArrayBufferView data);
2238
- };
2239
-
2240
- [Exposed=(Window,Worker)]
2241
- interface CloseEvent : Event {
2242
- constructor(DOMString type, optional CloseEventInit eventInitDict = {});
2243
-
2244
- readonly attribute boolean wasClean;
2245
- readonly attribute unsigned short code;
2246
- readonly attribute USVString reason;
2247
- };
2248
-
2249
- dictionary CloseEventInit : EventInit {
2250
- boolean wasClean = false;
2251
- unsigned short code = 0;
2252
- USVString reason = "";
2253
- };
2254
-
2255
2211
  [Exposed=(Window,Worker)]
2256
2212
  interface MessageChannel {
2257
2213
  constructor();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@webref/idl",
3
3
  "description": "Web IDL definitions of the web platform",
4
- "version": "3.1.1",
4
+ "version": "3.2.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/w3c/webref.git"
package/permissions.idl CHANGED
@@ -19,13 +19,13 @@ interface Permissions {
19
19
  };
20
20
 
21
21
  dictionary PermissionDescriptor {
22
- required PermissionName name;
22
+ required DOMString name;
23
23
  };
24
24
 
25
25
  [Exposed=(Window,Worker)]
26
26
  interface PermissionStatus : EventTarget {
27
27
  readonly attribute PermissionState state;
28
- readonly attribute PermissionName name;
28
+ readonly attribute DOMString name;
29
29
  attribute EventHandler onchange;
30
30
  };
31
31
 
@@ -35,24 +35,8 @@ enum PermissionState {
35
35
  "prompt",
36
36
  };
37
37
 
38
- enum PermissionName {
39
- "accelerometer",
40
- "ambient-light-sensor",
41
- "background-fetch",
42
- "background-sync",
43
- "bluetooth",
44
- "camera",
45
- "display-capture",
46
- "geolocation",
47
- "gyroscope",
48
- "magnetometer",
49
- "microphone",
50
- "midi",
51
- "nfc",
52
- "notifications",
53
- "persistent-storage",
54
- "push",
55
- "screen-wake-lock",
56
- "speaker-selection",
57
- "xr-spatial-tracking",
38
+ dictionary PermissionSetParameters {
39
+ required PermissionDescriptor descriptor;
40
+ required PermissionState state;
41
+ boolean oneRealm = false;
58
42
  };
@@ -53,5 +53,5 @@ interface TaskSignal : AbortSignal {
53
53
  };
54
54
 
55
55
  partial interface mixin WindowOrWorkerGlobalScope {
56
- readonly attribute Scheduler scheduler;
56
+ [Replaceable] readonly attribute Scheduler scheduler;
57
57
  };
@@ -5,6 +5,7 @@
5
5
 
6
6
  dictionary SecurePaymentConfirmationRequest {
7
7
  required BufferSource challenge;
8
+ required USVString rpId;
8
9
  required FrozenArray<BufferSource> credentialIds;
9
10
  required PaymentCredentialInstrument instrument;
10
11
  unsigned long timeout;
@@ -42,6 +43,7 @@ dictionary CollectedClientAdditionalPaymentData {
42
43
  dictionary PaymentCredentialInstrument {
43
44
  required DOMString displayName;
44
45
  required USVString icon;
46
+ boolean iconMustBeShown = true;
45
47
  };
46
48
 
47
49
  enum TransactionAutomationMode {
package/webcodecs.idl CHANGED
@@ -8,7 +8,7 @@ interface AudioDecoder {
8
8
  constructor(AudioDecoderInit init);
9
9
 
10
10
  readonly attribute CodecState state;
11
- readonly attribute long decodeQueueSize;
11
+ readonly attribute unsigned long decodeQueueSize;
12
12
 
13
13
  undefined configure(AudioDecoderConfig config);
14
14
  undefined decode(EncodedAudioChunk chunk);
@@ -31,7 +31,7 @@ interface VideoDecoder {
31
31
  constructor(VideoDecoderInit init);
32
32
 
33
33
  readonly attribute CodecState state;
34
- readonly attribute long decodeQueueSize;
34
+ readonly attribute unsigned long decodeQueueSize;
35
35
 
36
36
  undefined configure(VideoDecoderConfig config);
37
37
  undefined decode(EncodedVideoChunk chunk);
@@ -54,7 +54,7 @@ interface AudioEncoder {
54
54
  constructor(AudioEncoderInit init);
55
55
 
56
56
  readonly attribute CodecState state;
57
- readonly attribute long encodeQueueSize;
57
+ readonly attribute unsigned long encodeQueueSize;
58
58
 
59
59
  undefined configure(AudioEncoderConfig config);
60
60
  undefined encode(AudioData data);
@@ -83,7 +83,7 @@ interface VideoEncoder {
83
83
  constructor(VideoEncoderInit init);
84
84
 
85
85
  readonly attribute CodecState state;
86
- readonly attribute long encodeQueueSize;
86
+ readonly attribute unsigned long encodeQueueSize;
87
87
 
88
88
  undefined configure(VideoEncoderConfig config);
89
89
  undefined encode(VideoFrame frame, optional VideoEncoderEncodeOptions options = {});
@@ -425,6 +425,7 @@ enum VideoMatrixCoefficients {
425
425
  interface ImageDecoder {
426
426
  constructor(ImageDecoderInit init);
427
427
 
428
+ readonly attribute DOMString type;
428
429
  readonly attribute boolean complete;
429
430
  readonly attribute Promise<undefined> completed;
430
431
  readonly attribute ImageTrackList tracks;
@@ -462,16 +463,16 @@ interface ImageTrackList {
462
463
  getter ImageTrack (unsigned long index);
463
464
 
464
465
  readonly attribute Promise<undefined> ready;
465
- [EnforceRange] readonly attribute unsigned long length;
466
- [EnforceRange] readonly attribute long selectedIndex;
466
+ readonly attribute unsigned long length;
467
+ readonly attribute long selectedIndex;
467
468
  readonly attribute ImageTrack? selectedTrack;
468
469
  };
469
470
 
470
471
  [Exposed=(Window,DedicatedWorker)]
471
472
  interface ImageTrack : EventTarget {
472
473
  readonly attribute boolean animated;
473
- [EnforceRange] readonly attribute unsigned long frameCount;
474
- [EnforceRange] readonly attribute unrestricted float repetitionCount;
474
+ readonly attribute unsigned long frameCount;
475
+ readonly attribute unrestricted float repetitionCount;
475
476
  attribute EventHandler onchange;
476
477
  attribute boolean selected;
477
478
  };
package/webgpu.idl CHANGED
@@ -355,6 +355,7 @@ enum GPUTextureFormat {
355
355
 
356
356
  [Exposed=(Window, DedicatedWorker), SecureContext]
357
357
  interface GPUExternalTexture {
358
+ readonly attribute boolean expired;
358
359
  };
359
360
  GPUExternalTexture includes GPUObjectBase;
360
361
 
@@ -625,7 +626,7 @@ dictionary GPUMultisampleState {
625
626
  };
626
627
 
627
628
  dictionary GPUFragmentState : GPUProgrammableStage {
628
- required sequence<GPUColorTargetState> targets;
629
+ required sequence<GPUColorTargetState?> targets;
629
630
  };
630
631
 
631
632
  dictionary GPUColorTargetState {
@@ -886,7 +887,7 @@ interface GPUComputePassEncoder {
886
887
  undefined dispatch(GPUSize32 workgroupCountX, optional GPUSize32 workgroupCountY = 1, optional GPUSize32 workgroupCountZ = 1);
887
888
  undefined dispatchIndirect(GPUBuffer indirectBuffer, GPUSize64 indirectOffset);
888
889
 
889
- undefined endPass();
890
+ undefined end();
890
891
  };
891
892
  GPUComputePassEncoder includes GPUObjectBase;
892
893
  GPUComputePassEncoder includes GPUCommandsMixin;
@@ -943,7 +944,7 @@ interface GPURenderPassEncoder {
943
944
  undefined endOcclusionQuery();
944
945
 
945
946
  undefined executeBundles(sequence<GPURenderBundle> bundles);
946
- undefined endPass();
947
+ undefined end();
947
948
  };
948
949
  GPURenderPassEncoder includes GPUObjectBase;
949
950
  GPURenderPassEncoder includes GPUCommandsMixin;
@@ -965,7 +966,7 @@ dictionary GPURenderPassTimestampWrite {
965
966
  typedef sequence<GPURenderPassTimestampWrite> GPURenderPassTimestampWrites;
966
967
 
967
968
  dictionary GPURenderPassDescriptor : GPUObjectDescriptorBase {
968
- required sequence<GPURenderPassColorAttachment> colorAttachments;
969
+ required sequence<GPURenderPassColorAttachment?> colorAttachments;
969
970
  GPURenderPassDepthStencilAttachment depthStencilAttachment;
970
971
  GPUQuerySet occlusionQuerySet;
971
972
  GPURenderPassTimestampWrites timestampWrites = [];
@@ -1005,7 +1006,7 @@ enum GPUStoreOp {
1005
1006
  };
1006
1007
 
1007
1008
  dictionary GPURenderPassLayout: GPUObjectDescriptorBase {
1008
- required sequence<GPUTextureFormat> colorFormats;
1009
+ required sequence<GPUTextureFormat?> colorFormats;
1009
1010
  GPUTextureFormat depthStencilFormat;
1010
1011
  GPUSize32 sampleCount = 1;
1011
1012
  };
package/webnn.idl CHANGED
@@ -16,33 +16,20 @@ enum MLDevicePreference {
16
16
  };
17
17
 
18
18
  enum MLPowerPreference {
19
- // Let the user agent select the most suitable behavior.
20
19
  "default",
21
-
22
- // Prioritizes execution speed over power consumption.
23
20
  "high-performance",
24
-
25
- // Prioritizes power consumption over other considerations such as execution speed.
26
21
  "low-power"
27
22
  };
28
23
 
29
24
  dictionary MLContextOptions {
30
- // Preferred kind of device used
31
25
  MLDevicePreference devicePreference = "default";
32
-
33
- // Preference as related to power consumption
34
26
  MLPowerPreference powerPreference = "default";
35
27
  };
36
28
 
37
29
  [SecureContext, Exposed=(Window, DedicatedWorker)]
38
30
  interface ML {
39
- // Create a context with options
40
31
  MLContext createContext(optional MLContextOptions options = {});
41
-
42
- // Create a context from WebGL rendering context
43
32
  MLContext createContext(WebGLRenderingContext glContext);
44
-
45
- // Create a context from WebGPU device
46
33
  MLContext createContext(GPUDevice gpuDevice);
47
34
  };
48
35
 
package/websockets.idl ADDED
@@ -0,0 +1,48 @@
1
+ // GENERATED CONTENT - DO NOT EDIT
2
+ // Content was automatically extracted by Reffy into webref
3
+ // (https://github.com/w3c/webref)
4
+ // Source: WebSockets Standard (https://websockets.spec.whatwg.org/)
5
+
6
+ enum BinaryType { "blob", "arraybuffer" };
7
+
8
+ [Exposed=(Window,Worker)]
9
+ interface WebSocket : EventTarget {
10
+ constructor(USVString url, optional (DOMString or sequence<DOMString>) protocols = []);
11
+ readonly attribute USVString url;
12
+
13
+ // ready state
14
+ const unsigned short CONNECTING = 0;
15
+ const unsigned short OPEN = 1;
16
+ const unsigned short CLOSING = 2;
17
+ const unsigned short CLOSED = 3;
18
+ readonly attribute unsigned short readyState;
19
+ readonly attribute unsigned long long bufferedAmount;
20
+
21
+ // networking
22
+ attribute EventHandler onopen;
23
+ attribute EventHandler onerror;
24
+ attribute EventHandler onclose;
25
+ readonly attribute DOMString extensions;
26
+ readonly attribute DOMString protocol;
27
+ undefined close(optional [Clamp] unsigned short code, optional USVString reason);
28
+
29
+ // messaging
30
+ attribute EventHandler onmessage;
31
+ attribute BinaryType binaryType;
32
+ undefined send((BufferSource or Blob or USVString) data);
33
+ };
34
+
35
+ [Exposed=(Window,Worker)]
36
+ interface CloseEvent : Event {
37
+ constructor(DOMString type, optional CloseEventInit eventInitDict = {});
38
+
39
+ readonly attribute boolean wasClean;
40
+ readonly attribute unsigned short code;
41
+ readonly attribute USVString reason;
42
+ };
43
+
44
+ dictionary CloseEventInit : EventInit {
45
+ boolean wasClean = false;
46
+ unsigned short code = 0;
47
+ USVString reason = "";
48
+ };
package/webtransport.idl CHANGED
@@ -54,6 +54,7 @@ dictionary WebTransportStats {
54
54
  DOMHighResTimeStamp timestamp;
55
55
  unsigned long long bytesSent;
56
56
  unsigned long long packetsSent;
57
+ unsigned long long packetsLost;
57
58
  unsigned long numOutgoingStreamsCreated;
58
59
  unsigned long numIncomingStreamsCreated;
59
60
  unsigned long long bytesReceived;
package/webusb.idl CHANGED
@@ -68,6 +68,7 @@ interface USBDevice {
68
68
  readonly attribute boolean opened;
69
69
  Promise<undefined> open();
70
70
  Promise<undefined> close();
71
+ Promise<undefined> forget();
71
72
  Promise<undefined> selectConfiguration(octet configurationValue);
72
73
  Promise<undefined> claimInterface(octet interfaceNumber);
73
74
  Promise<undefined> releaseInterface(octet interfaceNumber);