@webref/idl 3.9.0 → 3.10.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.
package/FedCM.idl ADDED
@@ -0,0 +1,40 @@
1
+ // GENERATED CONTENT - DO NOT EDIT
2
+ // Content was automatically extracted by Reffy into webref
3
+ // (https://github.com/w3c/webref)
4
+ // Source: Federated Credential Management API (https://fedidcg.github.io/FedCM/)
5
+
6
+ [Exposed=Window, SecureContext]
7
+ dictionary FederatedAccountLoginRequest {
8
+ AbortSignal signal;
9
+ USVString nonce;
10
+ };
11
+
12
+ [Exposed=Window, SecureContext]
13
+ partial interface FederatedCredential {
14
+ Promise<FederatedTokens> login(optional FederatedAccountLoginRequest request = {});
15
+ };
16
+
17
+ [Exposed=Window, SecureContext]
18
+ dictionary FederatedTokens {
19
+ USVString idToken;
20
+ };
21
+
22
+ [Exposed=Window, SecureContext]
23
+ partial interface FederatedCredential {
24
+ Promise<undefined> revoke(USVString hint);
25
+ };
26
+
27
+ [Exposed=Window, SecureContext]
28
+ partial interface FederatedCredential {
29
+ Promise<undefined> logout();
30
+ };
31
+
32
+ dictionary FederatedCredentialLogoutRpsRequest {
33
+ required USVString url;
34
+ required USVString accountId;
35
+ };
36
+
37
+ [Exposed=Window, SecureContext]
38
+ partial interface FederatedCredential {
39
+ static Promise<undefined> logoutRPs(sequence<FederatedCredentialLogoutRpsRequest> logoutRequests);
40
+ };
@@ -0,0 +1,9 @@
1
+ // GENERATED CONTENT - DO NOT EDIT
2
+ // Content was automatically extracted by Reffy into webref
3
+ // (https://github.com/w3c/webref)
4
+ // Source: Viewport Capture (https://w3c.github.io/mediacapture-viewport/)
5
+
6
+ partial interface MediaDevices {
7
+ Promise<MediaStream> getViewportMedia(
8
+ optional DisplayMediaStreamConstraints constraints = {});
9
+ };
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.9.0",
4
+ "version": "3.10.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/w3c/webref.git"
package/webaudio.idl CHANGED
@@ -92,7 +92,7 @@ dictionary AudioTimestamp {
92
92
  };
93
93
 
94
94
  [Exposed=Window]
95
- interface AudioRenderCapacity {
95
+ interface AudioRenderCapacity : EventTarget {
96
96
  undefined start(optional AudioRenderCapacityOptions options = {});
97
97
  undefined stop();
98
98
  attribute EventHandler onupdate;
@@ -103,15 +103,21 @@ dictionary AudioRenderCapacityOptions {
103
103
  };
104
104
 
105
105
  [Exposed=Window]
106
- interface AudioRenderCapacityEvent {
107
- constructor (DOMString type, double timestamp, double averageLoad,
108
- double peakLoad, double underrunRatio);
106
+ interface AudioRenderCapacityEvent : Event {
107
+ constructor (DOMString type, optional AudioRenderCapacityEventInit eventInitDict = {});
109
108
  readonly attribute double timestamp;
110
109
  readonly attribute double averageLoad;
111
110
  readonly attribute double peakLoad;
112
111
  readonly attribute double underrunRatio;
113
112
  };
114
113
 
114
+ dictionary AudioRenderCapacityEventInit : EventInit {
115
+ double timestamp = 0;
116
+ double averageLoad = 0;
117
+ double peakLoad = 0;
118
+ double underrunRatio = 0;
119
+ };
120
+
115
121
  [Exposed=Window]
116
122
  interface OfflineAudioContext : BaseAudioContext {
117
123
  constructor(OfflineAudioContextOptions contextOptions);
package/webnn.idl CHANGED
@@ -9,10 +9,9 @@ interface mixin NavigatorML {
9
9
  Navigator includes NavigatorML;
10
10
  WorkerNavigator includes NavigatorML;
11
11
 
12
- enum MLDevicePreference {
13
- "default",
14
- "gpu",
15
- "cpu"
12
+ enum MLDeviceType {
13
+ "cpu",
14
+ "gpu"
16
15
  };
17
16
 
18
17
  enum MLPowerPreference {
@@ -22,20 +21,43 @@ enum MLPowerPreference {
22
21
  };
23
22
 
24
23
  dictionary MLContextOptions {
25
- MLDevicePreference devicePreference = "default";
24
+ MLDeviceType deviceType = "cpu";
26
25
  MLPowerPreference powerPreference = "default";
27
26
  };
28
27
 
29
28
  [SecureContext, Exposed=(Window, DedicatedWorker)]
30
29
  interface ML {
31
30
  MLContext createContext(optional MLContextOptions options = {});
32
- MLContext createContext(WebGLRenderingContext glContext);
33
31
  MLContext createContext(GPUDevice gpuDevice);
32
+ MLContext createContext(WebGLRenderingContext glContext);
33
+ };
34
+
35
+ dictionary MLArrayInput {
36
+ required ArrayBufferView resource;
37
+ required sequence<long> dimensions;
34
38
  };
35
39
 
40
+ typedef record<DOMString, (ArrayBufferView or MLArrayInput)> MLNamedArrayInputs;
41
+ typedef record<DOMString, ArrayBufferView> MLNamedArrayOutputs;
42
+
36
43
  [SecureContext, Exposed=(Window, DedicatedWorker)]
37
44
  interface MLContext {};
38
45
 
46
+ partial interface MLContext {
47
+ [Exposed=(DedicatedWorker)]
48
+ undefined compute(MLGraph graph, MLNamedArrayInputs inputs, MLNamedArrayOutputs outputs);
49
+ };
50
+
51
+ partial interface MLContext {
52
+ Promise<undefined> computeAsync(MLGraph graph, MLNamedArrayInputs inputs,
53
+
54
+ MLNamedArrayOutputs outputs);
55
+ };
56
+
57
+ partial interface MLContext {
58
+ MLCommandEncoder createCommandEncoder();
59
+ };
60
+
39
61
  enum MLInputOperandLayout {
40
62
  "nchw",
41
63
  "nhwc"
@@ -90,6 +112,7 @@ interface MLGraphBuilder {
90
112
  MLOperand constant(double value, optional MLOperandType type = "float32");
91
113
 
92
114
  // Compile the graph up to the specified output operands
115
+ [Exposed=(DedicatedWorker)]
93
116
  MLGraph build(MLNamedOperands outputs);
94
117
  };
95
118
 
@@ -454,17 +477,30 @@ partial interface MLGraphBuilder {
454
477
  MLOperand transpose(MLOperand input, optional MLTransposeOptions options = {});
455
478
  };
456
479
 
457
- typedef (MLBufferView or WebGLTexture or GPUTexture) MLResource;
480
+ [SecureContext, Exposed=(Window, DedicatedWorker)]
481
+ interface MLGraph {};
482
+
483
+ typedef (GPUBuffer or GPUTexture) MLGPUResource;
458
484
 
459
- dictionary MLInput {
460
- required MLResource resource;
485
+ dictionary MLGPUInput {
486
+ required MLGPUResource resource;
461
487
  required sequence<long> dimensions;
462
488
  };
463
489
 
464
- typedef record<DOMString, (MLResource or MLInput)> MLNamedInputs;
465
- typedef record<DOMString, MLResource> MLNamedOutputs;
490
+ typedef record<DOMString, (MLGPUResource or MLGPUInput)> MLNamedGPUInputs;
491
+ typedef record<DOMString, MLGPUResource> MLNamedGPUOutputs;
466
492
 
467
493
  [SecureContext, Exposed=(Window, DedicatedWorker)]
468
- interface MLGraph {
469
- undefined compute(MLNamedInputs inputs, MLNamedOutputs outputs);
494
+ interface MLCommandEncoder {};
495
+
496
+ partial interface MLCommandEncoder {
497
+ undefined initializeGraph(MLGraph graph);
498
+ };
499
+
500
+ partial interface MLCommandEncoder {
501
+ undefined dispatch(MLGraph graph, MLNamedGPUInputs inputs, MLNamedGPUOutputs outputs);
502
+ };
503
+
504
+ partial interface MLCommandEncoder {
505
+ GPUCommandBuffer finish(optional GPUCommandBufferDescriptor descriptor = {});
470
506
  };