@webref/idl 3.1.2 → 3.2.1

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/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.2",
4
+ "version": "3.2.1",
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
  };
@@ -3,28 +3,28 @@
3
3
  // (https://github.com/w3c/webref)
4
4
  // Source: Priority Hints (https://wicg.github.io/priority-hints/)
5
5
 
6
- enum Importance { "high", "low", "auto" };
6
+ enum FetchPriority { "high", "low", "auto" };
7
7
 
8
8
  partial interface Request {
9
- readonly attribute Importance importance;
9
+ readonly attribute FetchPriority priority;
10
10
  };
11
11
 
12
12
  partial dictionary RequestInit {
13
- Importance importance;
13
+ FetchPriority priority;
14
14
  };
15
15
 
16
16
  partial interface HTMLImageElement {
17
- [CEReactions] attribute DOMString importance;
17
+ [CEReactions] attribute DOMString fetchpriority;
18
18
  };
19
19
 
20
20
  partial interface HTMLLinkElement {
21
- [CEReactions] attribute DOMString importance;
21
+ [CEReactions] attribute DOMString fetchpriority;
22
22
  };
23
23
 
24
24
  partial interface HTMLScriptElement {
25
- [CEReactions] attribute DOMString importance;
25
+ [CEReactions] attribute DOMString fetchpriority;
26
26
  };
27
27
 
28
28
  partial interface HTMLIFrameElement {
29
- [CEReactions] attribute DOMString importance;
29
+ [CEReactions] attribute DOMString fetchpriority;
30
30
  };
@@ -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;
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
 
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
@@ -47,68 +47,12 @@ interface USBConnectionEvent : Event {
47
47
  [SameObject] readonly attribute USBDevice device;
48
48
  };
49
49
 
50
- [Exposed=(DedicatedWorker,SharedWorker,Window), SecureContext]
51
- interface USBDevice {
52
- readonly attribute octet usbVersionMajor;
53
- readonly attribute octet usbVersionMinor;
54
- readonly attribute octet usbVersionSubminor;
55
- readonly attribute octet deviceClass;
56
- readonly attribute octet deviceSubclass;
57
- readonly attribute octet deviceProtocol;
58
- readonly attribute unsigned short vendorId;
59
- readonly attribute unsigned short productId;
60
- readonly attribute octet deviceVersionMajor;
61
- readonly attribute octet deviceVersionMinor;
62
- readonly attribute octet deviceVersionSubminor;
63
- readonly attribute DOMString? manufacturerName;
64
- readonly attribute DOMString? productName;
65
- readonly attribute DOMString? serialNumber;
66
- readonly attribute USBConfiguration? configuration;
67
- readonly attribute FrozenArray<USBConfiguration> configurations;
68
- readonly attribute boolean opened;
69
- Promise<undefined> open();
70
- Promise<undefined> close();
71
- Promise<undefined> selectConfiguration(octet configurationValue);
72
- Promise<undefined> claimInterface(octet interfaceNumber);
73
- Promise<undefined> releaseInterface(octet interfaceNumber);
74
- Promise<undefined> selectAlternateInterface(octet interfaceNumber, octet alternateSetting);
75
- Promise<USBInTransferResult> controlTransferIn(USBControlTransferParameters setup, unsigned short length);
76
- Promise<USBOutTransferResult> controlTransferOut(USBControlTransferParameters setup, optional BufferSource data);
77
- Promise<undefined> clearHalt(USBDirection direction, octet endpointNumber);
78
- Promise<USBInTransferResult> transferIn(octet endpointNumber, unsigned long length);
79
- Promise<USBOutTransferResult> transferOut(octet endpointNumber, BufferSource data);
80
- Promise<USBIsochronousInTransferResult> isochronousTransferIn(octet endpointNumber, sequence<unsigned long> packetLengths);
81
- Promise<USBIsochronousOutTransferResult> isochronousTransferOut(octet endpointNumber, BufferSource data, sequence<unsigned long> packetLengths);
82
- Promise<undefined> reset();
83
- };
84
-
85
- enum USBRequestType {
86
- "standard",
87
- "class",
88
- "vendor"
89
- };
90
-
91
- enum USBRecipient {
92
- "device",
93
- "interface",
94
- "endpoint",
95
- "other"
96
- };
97
-
98
50
  enum USBTransferStatus {
99
51
  "ok",
100
52
  "stall",
101
53
  "babble"
102
54
  };
103
55
 
104
- dictionary USBControlTransferParameters {
105
- required USBRequestType requestType;
106
- required USBRecipient recipient;
107
- required octet request;
108
- required unsigned short value;
109
- required unsigned short index;
110
- };
111
-
112
56
  [
113
57
  Exposed=(DedicatedWorker,SharedWorker,Window),
114
58
  SecureContext
@@ -168,6 +112,63 @@ interface USBIsochronousOutTransferResult {
168
112
  readonly attribute FrozenArray<USBIsochronousOutTransferPacket> packets;
169
113
  };
170
114
 
115
+ [Exposed=(DedicatedWorker,SharedWorker,Window), SecureContext]
116
+ interface USBDevice {
117
+ readonly attribute octet usbVersionMajor;
118
+ readonly attribute octet usbVersionMinor;
119
+ readonly attribute octet usbVersionSubminor;
120
+ readonly attribute octet deviceClass;
121
+ readonly attribute octet deviceSubclass;
122
+ readonly attribute octet deviceProtocol;
123
+ readonly attribute unsigned short vendorId;
124
+ readonly attribute unsigned short productId;
125
+ readonly attribute octet deviceVersionMajor;
126
+ readonly attribute octet deviceVersionMinor;
127
+ readonly attribute octet deviceVersionSubminor;
128
+ readonly attribute DOMString? manufacturerName;
129
+ readonly attribute DOMString? productName;
130
+ readonly attribute DOMString? serialNumber;
131
+ readonly attribute USBConfiguration? configuration;
132
+ readonly attribute FrozenArray<USBConfiguration> configurations;
133
+ readonly attribute boolean opened;
134
+ Promise<undefined> open();
135
+ Promise<undefined> close();
136
+ Promise<undefined> forget();
137
+ Promise<undefined> selectConfiguration(octet configurationValue);
138
+ Promise<undefined> claimInterface(octet interfaceNumber);
139
+ Promise<undefined> releaseInterface(octet interfaceNumber);
140
+ Promise<undefined> selectAlternateInterface(octet interfaceNumber, octet alternateSetting);
141
+ Promise<USBInTransferResult> controlTransferIn(USBControlTransferParameters setup, unsigned short length);
142
+ Promise<USBOutTransferResult> controlTransferOut(USBControlTransferParameters setup, optional BufferSource data);
143
+ Promise<undefined> clearHalt(USBDirection direction, octet endpointNumber);
144
+ Promise<USBInTransferResult> transferIn(octet endpointNumber, unsigned long length);
145
+ Promise<USBOutTransferResult> transferOut(octet endpointNumber, BufferSource data);
146
+ Promise<USBIsochronousInTransferResult> isochronousTransferIn(octet endpointNumber, sequence<unsigned long> packetLengths);
147
+ Promise<USBIsochronousOutTransferResult> isochronousTransferOut(octet endpointNumber, BufferSource data, sequence<unsigned long> packetLengths);
148
+ Promise<undefined> reset();
149
+ };
150
+
151
+ enum USBRequestType {
152
+ "standard",
153
+ "class",
154
+ "vendor"
155
+ };
156
+
157
+ enum USBRecipient {
158
+ "device",
159
+ "interface",
160
+ "endpoint",
161
+ "other"
162
+ };
163
+
164
+ dictionary USBControlTransferParameters {
165
+ required USBRequestType requestType;
166
+ required USBRecipient recipient;
167
+ required octet request;
168
+ required unsigned short value;
169
+ required unsigned short index;
170
+ };
171
+
171
172
  [
172
173
  Exposed=(DedicatedWorker,SharedWorker,Window),
173
174
  SecureContext