Sync interfaces/ with @webref/idl 2.4.0 (#29414)
diff --git a/interfaces/CSP.idl b/interfaces/CSP.idl
index fd08a33..1e69b3c 100644
--- a/interfaces/CSP.idl
+++ b/interfaces/CSP.idl
@@ -25,11 +25,9 @@
[Exposed=(Window,Worker)]
interface SecurityPolicyViolationEvent : Event {
constructor(DOMString type, optional SecurityPolicyViolationEventInit eventInitDict = {});
- readonly attribute USVString documentURL;
- readonly attribute USVString documentURI; // historical alias of documentURL
+ readonly attribute USVString documentURI;
readonly attribute USVString referrer;
- readonly attribute USVString blockedURL;
- readonly attribute USVString blockedURI; // historical alias of blockedURL
+ readonly attribute USVString blockedURI;
readonly attribute DOMString effectiveDirective;
readonly attribute DOMString violatedDirective; // historical alias of effectiveDirective
readonly attribute DOMString originalPolicy;
@@ -37,22 +35,21 @@
readonly attribute DOMString sample;
readonly attribute SecurityPolicyViolationEventDisposition disposition;
readonly attribute unsigned short statusCode;
- readonly attribute unsigned long lineno;
- readonly attribute unsigned long lineNumber; // historical alias of lineno
- readonly attribute unsigned long colno;
- readonly attribute unsigned long columnNumber; // historical alias of colno
+ readonly attribute unsigned long lineNumber;
+ readonly attribute unsigned long columnNumber;
};
dictionary SecurityPolicyViolationEventInit : EventInit {
- required USVString documentURL;
+ required USVString documentURI;
USVString referrer = "";
- USVString blockedURL = "";
+ USVString blockedURI = "";
+ required DOMString violatedDirective;
required DOMString effectiveDirective;
required DOMString originalPolicy;
USVString sourceFile = "";
DOMString sample = "";
required SecurityPolicyViolationEventDisposition disposition;
required unsigned short statusCode;
- unsigned long lineno = 0;
- unsigned long colno = 0;
+ unsigned long lineNumber = 0;
+ unsigned long columnNumber = 0;
};
diff --git a/interfaces/WebCryptoAPI.idl b/interfaces/WebCryptoAPI.idl
index d7fce62..e3a7089 100644
--- a/interfaces/WebCryptoAPI.idl
+++ b/interfaces/WebCryptoAPI.idl
@@ -29,7 +29,7 @@
enum KeyUsage { "encrypt", "decrypt", "sign", "verify", "deriveKey", "deriveBits", "wrapKey", "unwrapKey" };
-[SecureContext,Exposed=(Window,Worker)]
+[SecureContext,Exposed=(Window,Worker),Serializable]
interface CryptoKey {
readonly attribute KeyType type;
readonly attribute boolean extractable;
diff --git a/interfaces/WebIDL.idl b/interfaces/WebIDL.idl
index 5179d16..546eb2b 100644
--- a/interfaces/WebIDL.idl
+++ b/interfaces/WebIDL.idl
@@ -5,6 +5,7 @@
typedef (Int8Array or Int16Array or Int32Array or
Uint8Array or Uint16Array or Uint32Array or Uint8ClampedArray or
+ BigInt64Array or BigUint64Array or
Float32Array or Float64Array or DataView) ArrayBufferView;
typedef (ArrayBufferView or ArrayBuffer) BufferSource;
diff --git a/interfaces/app-history.idl b/interfaces/app-history.idl
new file mode 100644
index 0000000..3adec7d
--- /dev/null
+++ b/interfaces/app-history.idl
@@ -0,0 +1,114 @@
+// GENERATED CONTENT - DO NOT EDIT
+// Content was automatically extracted by Reffy into webref
+// (https://github.com/w3c/webref)
+// Source: App History API (https://wicg.github.io/app-history/)
+
+partial interface Window {
+ readonly attribute AppHistory appHistory;
+};
+
+[Exposed=Window]
+interface AppHistory : EventTarget {
+ sequence<AppHistoryEntry> entries();
+ readonly attribute AppHistoryEntry? current;
+ undefined updateCurrent(AppHistoryUpdateCurrentOptions options);
+ readonly attribute AppHistoryTransition? transition;
+
+ readonly attribute boolean canGoBack;
+ readonly attribute boolean canGoForward;
+
+ Promise<undefined> navigate(USVString url, optional AppHistoryNavigateOptions options = {});
+ Promise<undefined> reload(optional AppHistoryReloadOptions options = {});
+
+ Promise<undefined> goTo(DOMString key, optional AppHistoryNavigationOptions options = {});
+ Promise<undefined> back(optional AppHistoryNavigationOptions options = {});
+ Promise<undefined> forward(optional AppHistoryNavigationOptions options = {});
+
+ attribute EventHandler onnavigate;
+ attribute EventHandler onnavigatesuccess;
+ attribute EventHandler onnavigateerror;
+};
+
+dictionary AppHistoryUpdateCurrentOptions {
+ required any state;
+};
+
+dictionary AppHistoryNavigationOptions {
+ any info;
+};
+
+dictionary AppHistoryNavigateOptions : AppHistoryNavigationOptions {
+ any state;
+ boolean replace = false;
+};
+
+dictionary AppHistoryReloadOptions : AppHistoryNavigationOptions {
+ any state;
+};
+
+[Exposed=Window]
+interface AppHistoryTransition {
+ readonly attribute AppHistoryNavigationType navigationType;
+ readonly attribute AppHistoryEntry from;
+ readonly attribute Promise<undefined> finished;
+
+ Promise<undefined> rollback(optional AppHistoryNavigationOptions options = {});
+};
+
+[Exposed=Window]
+interface AppHistoryNavigateEvent : Event {
+ constructor(DOMString type, AppHistoryNavigateEventInit eventInit);
+
+ readonly attribute AppHistoryNavigationType navigationType;
+ readonly attribute AppHistoryDestination destination;
+ readonly attribute boolean canTransition;
+ readonly attribute boolean userInitiated;
+ readonly attribute boolean hashChange;
+ readonly attribute AbortSignal signal;
+ readonly attribute FormData? formData;
+ readonly attribute any info;
+
+ undefined transitionWhile(Promise<undefined> newNavigationAction);
+};
+
+dictionary AppHistoryNavigateEventInit : EventInit {
+ AppHistoryNavigationType navigationType = "push";
+ required AppHistoryDestination destination;
+ boolean canTransition = false;
+ boolean userInitiated = false;
+ boolean hashChange = false;
+ required AbortSignal signal;
+ FormData? formData = null;
+ any info;
+};
+
+enum AppHistoryNavigationType {
+ "reload",
+ "push",
+ "replace",
+ "traverse"
+};
+
+[Exposed=Window]
+interface AppHistoryDestination {
+ readonly attribute USVString url;
+ readonly attribute DOMString? key;
+ readonly attribute DOMString? id;
+ readonly attribute long long index;
+ readonly attribute boolean sameDocument;
+
+ any getState();
+};
+
+[Exposed=Window]
+interface AppHistoryEntry : EventTarget {
+ readonly attribute USVString url;
+ readonly attribute DOMString key;
+ readonly attribute DOMString id;
+ readonly attribute long long index;
+ readonly attribute boolean sameDocument;
+
+ any getState();
+
+ // TODO event handlers
+};
diff --git a/interfaces/construct-stylesheets.idl b/interfaces/construct-stylesheets.idl
deleted file mode 100644
index 249af03..0000000
--- a/interfaces/construct-stylesheets.idl
+++ /dev/null
@@ -1,21 +0,0 @@
-// GENERATED CONTENT - DO NOT EDIT
-// Content was automatically extracted by Reffy into webref
-// (https://github.com/w3c/webref)
-// Source: Constructable Stylesheet Objects (https://wicg.github.io/construct-stylesheets/)
-
-partial interface CSSStyleSheet {
- constructor(optional CSSStyleSheetInit options = {});
- Promise<CSSStyleSheet> replace(USVString text);
- undefined replaceSync(USVString text);
-};
-
-dictionary CSSStyleSheetInit {
- (MediaList or DOMString) media = "";
- DOMString title = "";
- boolean alternate = false;
- boolean disabled = false;
-};
-
-partial interface mixin DocumentOrShadowRoot {
- attribute FrozenArray<CSSStyleSheet> adoptedStyleSheets;
-};
diff --git a/interfaces/contact-api.idl b/interfaces/contact-api.idl
index 88142a7..7f67a5d 100644
--- a/interfaces/contact-api.idl
+++ b/interfaces/contact-api.idl
@@ -11,7 +11,19 @@
enum ContactProperty { "address", "email", "icon", "name", "tel" };
[Exposed=Window]
-interface ContactAddress : PaymentAddress {};
+interface ContactAddress {
+ [Default] object toJSON();
+ readonly attribute DOMString city;
+ readonly attribute DOMString country;
+ readonly attribute DOMString dependentLocality;
+ readonly attribute DOMString organization;
+ readonly attribute DOMString phone;
+ readonly attribute DOMString postalCode;
+ readonly attribute DOMString recipient;
+ readonly attribute DOMString region;
+ readonly attribute DOMString sortingCode;
+ readonly attribute FrozenArray<DOMString> addressLine;
+};
dictionary ContactInfo {
sequence<ContactAddress> address;
@@ -25,7 +37,7 @@
boolean multiple = false;
};
-[Exposed=(Window,SecureContext)]
+[Exposed=Window,SecureContext]
interface ContactsManager {
Promise<sequence<ContactProperty>> getProperties();
Promise<sequence<ContactInfo>> select(sequence<ContactProperty> properties, optional ContactsSelectOptions options = {});
diff --git a/interfaces/conversion-measurement-api.idl b/interfaces/conversion-measurement-api.idl
new file mode 100644
index 0000000..20281f1
--- /dev/null
+++ b/interfaces/conversion-measurement-api.idl
@@ -0,0 +1,13 @@
+// GENERATED CONTENT - DO NOT EDIT
+// Content was automatically extracted by Reffy into webref
+// (https://github.com/w3c/webref)
+// Source: Attribution Reporting (https://wicg.github.io/conversion-measurement-api/)
+
+partial interface HTMLAnchorElement {
+ [CEReactions] attribute USVString attributionDestination;
+ [CEReactions] attribute DOMString attributionSourceEventId;
+ [CEReactions] attribute USVString attributionReportTo;
+ [CEReactions] attribute long long attributionExpiry;
+ [CEReactions] attribute long long attributionSourcePriority;
+ [CEReactions] attribute boolean registerAttributionSource;
+};
diff --git a/interfaces/css-nesting.idl b/interfaces/css-nesting.idl
index 25afacb..8d3cccb 100644
--- a/interfaces/css-nesting.idl
+++ b/interfaces/css-nesting.idl
@@ -1,7 +1,7 @@
// GENERATED CONTENT - DO NOT EDIT
// Content was automatically extracted by Reffy into webref
// (https://github.com/w3c/webref)
-// Source: CSS Nesting Module (https://drafts.csswg.org/css-nesting-1/)
+// Source: CSS Nesting Module (https://drafts.csswg.org/css-nesting/)
partial interface CSSStyleRule {
[SameObject] readonly attribute CSSRuleList cssRules;
diff --git a/interfaces/css-typed-om.idl b/interfaces/css-typed-om.idl
index 262d288..4b27ce0 100644
--- a/interfaces/css-typed-om.idl
+++ b/interfaces/css-typed-om.idl
@@ -158,10 +158,10 @@
[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet)]
interface CSSMathClamp : CSSMathValue {
- constructor(CSSNumberish min, CSSNumberish val, CSSNumberish max);
- readonly attribute CSSNumericValue min;
- readonly attribute CSSNumericValue val;
- readonly attribute CSSNumericValue max;
+ constructor(CSSNumberish lower, CSSNumberish value, CSSNumberish upper);
+ readonly attribute CSSNumericValue lower;
+ readonly attribute CSSNumericValue value;
+ readonly attribute CSSNumericValue upper;
};
[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet)]
diff --git a/interfaces/cssom.idl b/interfaces/cssom.idl
index c8e0bbb..49e7975 100644
--- a/interfaces/cssom.idl
+++ b/interfaces/cssom.idl
@@ -33,10 +33,21 @@
[Exposed=Window]
interface CSSStyleSheet : StyleSheet {
+ constructor(optional CSSStyleSheetInit options = {});
+
readonly attribute CSSRule? ownerRule;
[SameObject] readonly attribute CSSRuleList cssRules;
unsigned long insertRule(CSSOMString rule, optional unsigned long index = 0);
undefined deleteRule(unsigned long index);
+
+ Promise<CSSStyleSheet> replace(USVString text);
+ undefined replaceSync(USVString text);
+};
+
+dictionary CSSStyleSheetInit {
+ DOMString baseURL = null;
+ (MediaList or DOMString) media = "";
+ boolean disabled = false;
};
partial interface CSSStyleSheet {
@@ -53,6 +64,7 @@
partial interface mixin DocumentOrShadowRoot {
[SameObject] readonly attribute StyleSheetList styleSheets;
+ attribute ObservableArray<CSSStyleSheet> adoptedStyleSheets;
};
interface mixin LinkStyle {
diff --git a/interfaces/encrypted-media.idl b/interfaces/encrypted-media.idl
index ba8c32d..24db48e 100644
--- a/interfaces/encrypted-media.idl
+++ b/interfaces/encrypted-media.idl
@@ -46,13 +46,21 @@
Promise<boolean> setServerCertificate (BufferSource serverCertificate);
};
+enum MediaKeySessionClosedReason {
+ "internal-error",
+ "closed-by-application",
+ "release-acknowledged",
+ "hardware-context-reset",
+ "resource-evicted"
+};
+
[Exposed=Window, SecureContext] interface MediaKeySession : EventTarget {
- readonly attribute DOMString sessionId;
- readonly attribute unrestricted double expiration;
- readonly attribute Promise<undefined> closed;
- readonly attribute MediaKeyStatusMap keyStatuses;
- attribute EventHandler onkeystatuseschange;
- attribute EventHandler onmessage;
+ readonly attribute DOMString sessionId;
+ readonly attribute unrestricted double expiration;
+ readonly attribute Promise<MediaKeySessionClosedReason> closed;
+ readonly attribute MediaKeyStatusMap keyStatuses;
+ attribute EventHandler onkeystatuseschange;
+ attribute EventHandler onmessage;
Promise<undefined> generateRequest (DOMString initDataType, BufferSource initData);
Promise<boolean> load (DOMString sessionId);
Promise<undefined> update (BufferSource response);
diff --git a/interfaces/eyedropper-api.idl b/interfaces/eyedropper-api.idl
new file mode 100644
index 0000000..69d5666
--- /dev/null
+++ b/interfaces/eyedropper-api.idl
@@ -0,0 +1,18 @@
+// GENERATED CONTENT - DO NOT EDIT
+// Content was automatically extracted by Reffy into webref
+// (https://github.com/w3c/webref)
+// Source: EyeDropper API (https://wicg.github.io/eyedropper-api/)
+
+dictionary ColorSelectionResult {
+ DOMString sRGBHex;
+};
+
+dictionary ColorSelectionOptions {
+ AbortSignal signal;
+};
+
+[Exposed=Window]
+interface EyeDropper {
+ constructor();
+ Promise<ColorSelectionResult> open(optional ColorSelectionOptions options = {});
+};
diff --git a/interfaces/html.idl b/interfaces/html.idl
index d878cba..4cb48c9 100644
--- a/interfaces/html.idl
+++ b/interfaces/html.idl
@@ -210,6 +210,7 @@
[CEReactions] attribute DOMString name;
[CEReactions] attribute DOMString httpEquiv;
[CEReactions] attribute DOMString content;
+ [CEReactions] attribute DOMString media;
// also has obsolete members
};
@@ -972,7 +973,7 @@
[SameObject] readonly attribute HTMLOptionsCollection options;
[CEReactions] attribute unsigned long length;
- getter Element? item(unsigned long index);
+ getter HTMLOptionElement? item(unsigned long index);
HTMLOptionElement? namedItem(DOMString name);
[CEReactions] undefined add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null);
[CEReactions] undefined remove(); // ChildNode overload
@@ -1215,6 +1216,8 @@
[CEReactions] attribute DOMString integrity;
[CEReactions] attribute DOMString referrerPolicy;
+ static boolean supports(DOMString type);
+
// also has obsolete members
};
@@ -1239,7 +1242,7 @@
boolean flatten = false;
};
-typedef (CanvasRenderingContext2D or ImageBitmapRenderingContext or WebGLRenderingContext or WebGL2RenderingContext) RenderingContext;
+typedef (CanvasRenderingContext2D or ImageBitmapRenderingContext or WebGLRenderingContext or WebGL2RenderingContext or GPUCanvasContext) RenderingContext;
[Exposed=Window]
interface HTMLCanvasElement : HTMLElement {
@@ -1264,7 +1267,8 @@
HTMLVideoElement or
HTMLCanvasElement or
ImageBitmap or
- OffscreenCanvas) CanvasImageSource;
+ OffscreenCanvas or
+ VideoFrame) CanvasImageSource;
enum PredefinedColorSpace { "srgb", "display-p3" };
@@ -1274,6 +1278,7 @@
boolean alpha = true;
boolean desynchronized = false;
PredefinedColorSpace colorSpace = "srgb";
+ boolean willReadFrequently = false;
};
enum ImageSmoothingQuality { "low", "medium", "high" };
@@ -1307,6 +1312,7 @@
undefined save(); // push state on state stack
undefined restore(); // pop state stack and restore state
undefined reset(); // reset the rendering context to its default state
+ boolean isContextLost(); // return whether context is lost
};
interface mixin CanvasTransform {
@@ -1446,7 +1452,7 @@
attribute CanvasFontKerning fontKerning; // (default: "auto")
attribute CanvasFontStretch fontStretch; // (default: "normal")
attribute CanvasFontVariantCaps fontVariantCaps; // (default: "normal")
- attribute CanvasTextRendering textRendering; // (default: "normal")
+ attribute CanvasTextRendering textRendering; // (default: "auto")
};
interface mixin CanvasPath {
@@ -1458,6 +1464,7 @@
undefined bezierCurveTo(unrestricted double cp1x, unrestricted double cp1y, unrestricted double cp2x, unrestricted double cp2y, unrestricted double x, unrestricted double y);
undefined arcTo(unrestricted double x1, unrestricted double y1, unrestricted double x2, unrestricted double y2, unrestricted double radius);
undefined rect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h);
+ undefined roundRect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h, sequence<(unrestricted double or DOMPointInit)> radii);
undefined arc(unrestricted double x, unrestricted double y, unrestricted double radius, unrestricted double startAngle, unrestricted double endAngle, optional boolean counterclockwise = false);
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);
};
@@ -1527,14 +1534,14 @@
boolean alpha = true;
};
-typedef (OffscreenCanvasRenderingContext2D or ImageBitmapRenderingContext or WebGLRenderingContext or WebGL2RenderingContext) OffscreenRenderingContext;
+typedef (OffscreenCanvasRenderingContext2D or ImageBitmapRenderingContext or WebGLRenderingContext or WebGL2RenderingContext or GPUCanvasContext) OffscreenRenderingContext;
dictionary ImageEncodeOptions {
DOMString type = "image/png";
unrestricted double quality;
};
-enum OffscreenRenderingContextId { "2d", "bitmaprenderer", "webgl", "webgl2" };
+enum OffscreenRenderingContextId { "2d", "bitmaprenderer", "webgl", "webgl2", "webgpu" };
[Exposed=(Window,Worker), Transferable]
interface OffscreenCanvas : EventTarget {
@@ -1546,6 +1553,9 @@
OffscreenRenderingContext? getContext(OffscreenRenderingContextId contextId, optional any options = null);
ImageBitmap transferToImageBitmap();
Promise<Blob> convertToBlob(optional ImageEncodeOptions options = {});
+
+ attribute EventHandler oncontextlost;
+ attribute EventHandler oncontextrestored;
};
[Exposed=(Window,Worker)]
@@ -1724,6 +1734,7 @@
// the user agent
readonly attribute Navigator navigator;
+ readonly attribute Navigator clientInformation; // legacy alias of .navigator
readonly attribute boolean originAgentCluster;
// user prompts
@@ -1741,7 +1752,7 @@
Window includes GlobalEventHandlers;
Window includes WindowEventHandlers;
-dictionary WindowPostMessageOptions : PostMessageOptions {
+dictionary WindowPostMessageOptions : StructuredSerializeOptions {
USVString targetOrigin = "/";
};
@@ -1877,7 +1888,9 @@
attribute EventHandler onchange;
attribute EventHandler onclick;
attribute EventHandler onclose;
+ attribute EventHandler oncontextlost;
attribute EventHandler oncontextmenu;
+ attribute EventHandler oncontextrestored;
attribute EventHandler oncuechange;
attribute EventHandler ondblclick;
attribute EventHandler ondrag;
@@ -1968,6 +1981,8 @@
readonly attribute boolean isSecureContext;
readonly attribute boolean crossOriginIsolated;
+ undefined reportError(any e);
+
// base64 utility methods
DOMString btoa(DOMString data);
ByteString atob(DOMString data);
@@ -1984,6 +1999,9 @@
// ImageBitmap
Promise<ImageBitmap> createImageBitmap(ImageBitmapSource image, optional ImageBitmapOptions options = {});
Promise<ImageBitmap> createImageBitmap(ImageBitmapSource image, long sx, long sy, long sw, long sh, optional ImageBitmapOptions options = {});
+
+ // structured cloning
+ any structuredClone(any value, optional StructuredSerializeOptions options = {});
};
Window includes WindowOrWorkerGlobalScope;
WorkerGlobalScope includes WindowOrWorkerGlobalScope;
@@ -2050,6 +2068,49 @@
readonly attribute boolean cookieEnabled;
};
+interface mixin NavigatorPlugins {
+ [SameObject] readonly attribute PluginArray plugins;
+ [SameObject] readonly attribute MimeTypeArray mimeTypes;
+ boolean javaEnabled();
+ readonly attribute boolean pdfViewerEnabled;
+};
+
+[Exposed=Window,
+ LegacyUnenumerableNamedProperties]
+interface PluginArray {
+ undefined refresh();
+ readonly attribute unsigned long length;
+ getter Plugin? item(unsigned long index);
+ getter Plugin? namedItem(DOMString name);
+};
+
+[Exposed=Window,
+ LegacyUnenumerableNamedProperties]
+interface MimeTypeArray {
+ readonly attribute unsigned long length;
+ getter MimeType? item(unsigned long index);
+ getter MimeType? namedItem(DOMString name);
+};
+
+[Exposed=Window,
+ LegacyUnenumerableNamedProperties]
+interface Plugin {
+ readonly attribute DOMString name;
+ readonly attribute DOMString description;
+ readonly attribute DOMString filename;
+ readonly attribute unsigned long length;
+ getter MimeType? item(unsigned long index);
+ getter MimeType? namedItem(DOMString name);
+};
+
+[Exposed=Window]
+interface MimeType {
+ readonly attribute DOMString type;
+ readonly attribute DOMString description;
+ readonly attribute DOMString suffixes;
+ readonly attribute Plugin enabledPlugin;
+};
+
[Exposed=(Window,Worker), Serializable, Transferable]
interface ImageBitmap {
readonly attribute unsigned long width;
@@ -2189,7 +2250,7 @@
[Exposed=(Window,Worker,AudioWorklet), Transferable]
interface MessagePort : EventTarget {
undefined postMessage(any message, sequence<object> transfer);
- undefined postMessage(any message, optional PostMessageOptions options = {});
+ undefined postMessage(any message, optional StructuredSerializeOptions options = {});
undefined start();
undefined close();
@@ -2198,7 +2259,7 @@
attribute EventHandler onmessageerror;
};
-dictionary PostMessageOptions {
+dictionary StructuredSerializeOptions {
sequence<object> transfer = [];
};
@@ -2233,7 +2294,7 @@
[Replaceable] readonly attribute DOMString name;
undefined postMessage(any message, sequence<object> transfer);
- undefined postMessage(any message, optional PostMessageOptions options = {});
+ undefined postMessage(any message, optional StructuredSerializeOptions options = {});
undefined close();
@@ -2261,7 +2322,7 @@
undefined terminate();
undefined postMessage(any message, sequence<object> transfer);
- undefined postMessage(any message, optional PostMessageOptions options = {});
+ undefined postMessage(any message, optional StructuredSerializeOptions options = {});
attribute EventHandler onmessage;
attribute EventHandler onmessageerror;
};
@@ -2656,42 +2717,3 @@
undefined AddSearchProvider();
undefined IsSearchProviderInstalled();
};
-
-interface mixin NavigatorPlugins {
- [SameObject] readonly attribute PluginArray plugins;
- [SameObject] readonly attribute MimeTypeArray mimeTypes;
- boolean javaEnabled();
-};
-
-[Exposed=Window]
-interface PluginArray {
- undefined refresh();
- readonly attribute unsigned long length;
- getter object? item(unsigned long index);
- object? namedItem(DOMString name);
-};
-
-[Exposed=Window]
-interface MimeTypeArray {
- readonly attribute unsigned long length;
- getter object? item(unsigned long index);
- object? namedItem(DOMString name);
-};
-
-[Exposed=Window]
-interface Plugin {
- readonly attribute undefined name;
- readonly attribute undefined description;
- readonly attribute undefined filename;
- readonly attribute undefined length;
- getter undefined item(unsigned long index);
- undefined namedItem(DOMString name);
-};
-
-[Exposed=Window]
-interface MimeType {
- readonly attribute undefined type;
- readonly attribute undefined description;
- readonly attribute undefined suffixes;
- readonly attribute undefined enabledPlugin;
-};
diff --git a/interfaces/ink-enhancement.idl b/interfaces/ink-enhancement.idl
new file mode 100644
index 0000000..660e225
--- /dev/null
+++ b/interfaces/ink-enhancement.idl
@@ -0,0 +1,32 @@
+// GENERATED CONTENT - DO NOT EDIT
+// Content was automatically extracted by Reffy into webref
+// (https://github.com/w3c/webref)
+// Source: Ink API (https://wicg.github.io/ink-enhancement/)
+
+[Exposed=Window]
+interface Ink {
+ Promise<InkPresenter> requestPresenter(
+ optional InkPresenterParam param = {});
+};
+
+dictionary InkPresenterParam {
+ Element? presentationArea = null;
+};
+
+[Exposed=Window]
+interface InkPresenter {
+ readonly attribute Element? presentationArea;
+ readonly attribute unsigned long expectedImprovement;
+
+ undefined updateInkTrailStartPoint(PointerEvent event, InkTrailStyle style);
+};
+
+dictionary InkTrailStyle {
+ required DOMString color;
+ required unrestricted double diameter;
+};
+
+[Exposed=Window]
+partial interface Navigator {
+ [SameObject] readonly attribute Ink ink;
+};
diff --git a/interfaces/js-self-profiling.idl b/interfaces/js-self-profiling.idl
index 5285767..04cd1af 100644
--- a/interfaces/js-self-profiling.idl
+++ b/interfaces/js-self-profiling.idl
@@ -3,7 +3,7 @@
// (https://github.com/w3c/webref)
// Source: JS Self-Profiling API (https://wicg.github.io/js-self-profiling/)
-[Exposed=(Window,Worker)]
+[Exposed=Window]
interface Profiler : EventTarget {
readonly attribute DOMHighResTimeStamp sampleInterval;
readonly attribute boolean stopped;
@@ -32,10 +32,10 @@
};
dictionary ProfilerFrame {
- DOMString name;
- required unsigned long long resourceId;
- required unsigned long long line;
- required unsigned long long column;
+ required DOMString name;
+ unsigned long long resourceId;
+ unsigned long long line;
+ unsigned long long column;
};
dictionary ProfilerInitOptions {
diff --git a/interfaces/local-font-access.idl b/interfaces/local-font-access.idl
index d7fb3c9..577cd36 100644
--- a/interfaces/local-font-access.idl
+++ b/interfaces/local-font-access.idl
@@ -25,8 +25,14 @@
interface FontMetadata {
Promise<Blob> blob();
+ // Names
readonly attribute USVString postscriptName;
readonly attribute USVString fullName;
readonly attribute USVString family;
readonly attribute USVString style;
+
+ // Metrics
+ readonly attribute boolean italic;
+ readonly attribute float stretch;
+ readonly attribute float weight;
};
diff --git a/interfaces/mathml-core.idl b/interfaces/mathml-core.idl
index 7ea1346..3989288 100644
--- a/interfaces/mathml-core.idl
+++ b/interfaces/mathml-core.idl
@@ -1,7 +1,7 @@
// GENERATED CONTENT - DO NOT EDIT
// Content was automatically extracted by Reffy into webref
// (https://github.com/w3c/webref)
-// Source: MathML Core (https://mathml-refresh.github.io/mathml-core/)
+// Source: MathML Core (https://w3c.github.io/mathml-core/)
[Exposed=Window]
interface MathMLElement : Element { };
diff --git a/interfaces/media-source.idl b/interfaces/media-source.idl
index ba57b13..36bce56 100644
--- a/interfaces/media-source.idl
+++ b/interfaces/media-source.idl
@@ -14,7 +14,7 @@
"decode"
};
-[Exposed=Window]
+[Exposed=(Window,DedicatedWorker)]
interface MediaSource : EventTarget {
constructor();
readonly attribute SourceBufferList sourceBuffers;
@@ -24,6 +24,7 @@
attribute EventHandler onsourceopen;
attribute EventHandler onsourceended;
attribute EventHandler onsourceclose;
+ static readonly attribute boolean canConstructInDedicatedWorker;
SourceBuffer addSourceBuffer (DOMString type);
undefined removeSourceBuffer (SourceBuffer sourceBuffer);
undefined endOfStream (optional EndOfStreamError error);
@@ -37,7 +38,7 @@
"sequence"
};
-[Exposed=Window]
+[Exposed=(Window,DedicatedWorker)]
interface SourceBuffer : EventTarget {
attribute AppendMode mode;
readonly attribute boolean updating;
@@ -55,10 +56,11 @@
attribute EventHandler onabort;
undefined appendBuffer (BufferSource data);
undefined abort ();
+ undefined changeType (DOMString type);
undefined remove (double start, unrestricted double end);
};
-[Exposed=Window]
+[Exposed=(Window,DedicatedWorker)]
interface SourceBufferList : EventTarget {
readonly attribute unsigned long length;
attribute EventHandler onaddsourcebuffer;
@@ -66,14 +68,17 @@
getter SourceBuffer (unsigned long index);
};
+[Exposed=(Window,DedicatedWorker)]
partial interface AudioTrack {
readonly attribute SourceBuffer? sourceBuffer;
};
+[Exposed=(Window,DedicatedWorker)]
partial interface VideoTrack {
readonly attribute SourceBuffer? sourceBuffer;
};
+[Exposed=(Window,DedicatedWorker)]
partial interface TextTrack {
readonly attribute SourceBuffer? sourceBuffer;
};
diff --git a/interfaces/payment-handler.idl b/interfaces/payment-handler.idl
index 7636e8a..5360a83 100644
--- a/interfaces/payment-handler.idl
+++ b/interfaces/payment-handler.idl
@@ -75,7 +75,6 @@
readonly attribute FrozenArray<PaymentMethodData> methodData;
readonly attribute object total;
readonly attribute FrozenArray<PaymentDetailsModifier> modifiers;
- readonly attribute DOMString instrumentKey;
Promise<WindowClient?> openWindow(USVString url);
Promise<PaymentRequestDetailsUpdate?> changePaymentMethod(DOMString methodName, optional object? methodDetails = null);
undefined respondWith(Promise<PaymentHandlerResponse> handlerResponsePromise);
@@ -88,7 +87,6 @@
sequence<PaymentMethodData> methodData;
PaymentCurrencyAmount total;
sequence<PaymentDetailsModifier> modifiers;
- DOMString instrumentKey;
};
dictionary PaymentHandlerResponse {
diff --git a/interfaces/payment-method-basic-card.idl b/interfaces/payment-method-basic-card.idl
deleted file mode 100644
index 813fc6e..0000000
--- a/interfaces/payment-method-basic-card.idl
+++ /dev/null
@@ -1,31 +0,0 @@
-// GENERATED CONTENT - DO NOT EDIT
-// Content was automatically extracted by Reffy into webref
-// (https://github.com/w3c/webref)
-// Source: Payment Method: Basic Card (https://w3c.github.io/payment-method-basic-card/)
-
-dictionary BasicCardRequest {
- sequence<DOMString> supportedNetworks = [];
- boolean requestSecurityCode = true;
-};
-
-dictionary BasicCardChangeDetails {
- PaymentAddress? billingAddress = null;
-};
-
-dictionary BasicCardResponse {
- required DOMString cardNumber;
- DOMString cardholderName = "";
- DOMString cardSecurityCode = "";
- DOMString expiryMonth = "";
- DOMString expiryYear = "";
- PaymentAddress? billingAddress = null;
-};
-
-dictionary BasicCardErrors {
- DOMString cardNumber;
- DOMString cardholderName;
- DOMString cardSecurityCode;
- DOMString expiryMonth;
- DOMString expiryYear;
- AddressErrors billingAddress;
-};
diff --git a/interfaces/payment-request.idl b/interfaces/payment-request.idl
index cd16e2a..b66bb15 100644
--- a/interfaces/payment-request.idl
+++ b/interfaces/payment-request.idl
@@ -103,31 +103,3 @@
};
dictionary PaymentRequestUpdateEventInit : EventInit {};
-
-[SecureContext, Exposed=(Window)]
-interface PaymentAddress {
- [Default] object toJSON();
- readonly attribute DOMString city;
- readonly attribute DOMString country;
- readonly attribute DOMString dependentLocality;
- readonly attribute DOMString organization;
- readonly attribute DOMString phone;
- readonly attribute DOMString postalCode;
- readonly attribute DOMString recipient;
- readonly attribute DOMString region;
- readonly attribute DOMString sortingCode;
- readonly attribute FrozenArray<DOMString> addressLine;
-};
-
-dictionary AddressErrors {
- DOMString addressLine;
- DOMString city;
- DOMString country;
- DOMString dependentLocality;
- DOMString organization;
- DOMString phone;
- DOMString postalCode;
- DOMString recipient;
- DOMString region;
- DOMString sortingCode;
-};
diff --git a/interfaces/permissions.idl b/interfaces/permissions.idl
index 0ad42ff..a15bc21 100644
--- a/interfaces/permissions.idl
+++ b/interfaces/permissions.idl
@@ -3,22 +3,6 @@
// (https://github.com/w3c/webref)
// Source: Permissions (https://w3c.github.io/permissions/)
-dictionary PermissionDescriptor {
- required PermissionName name;
-};
-
-enum PermissionState {
- "granted",
- "denied",
- "prompt",
-};
-
-[Exposed=(Window,Worker)]
-interface PermissionStatus : EventTarget {
- readonly attribute PermissionState state;
- attribute EventHandler onchange;
-};
-
[Exposed=(Window)]
partial interface Navigator {
[SameObject] readonly attribute Permissions permissions;
@@ -34,6 +18,23 @@
Promise<PermissionStatus> query(object permissionDesc);
};
+dictionary PermissionDescriptor {
+ required PermissionName name;
+};
+
+[Exposed=(Window,Worker)]
+interface PermissionStatus : EventTarget {
+ readonly attribute PermissionState state;
+ readonly attribute PermissionName name;
+ attribute EventHandler onchange;
+};
+
+enum PermissionState {
+ "granted",
+ "denied",
+ "prompt",
+};
+
enum PermissionName {
"accelerometer",
"ambient-light-sensor",
@@ -41,8 +42,6 @@
"background-sync",
"bluetooth",
"camera",
- "clipboard-write",
- "device-info",
"display-capture",
"geolocation",
"gyroscope",
@@ -53,7 +52,9 @@
"notifications",
"persistent-storage",
"push",
+ "screen-wake-lock",
"speaker-selection",
+ "xr-spatial-tracking",
};
dictionary PushPermissionDescriptor : PermissionDescriptor {
@@ -71,9 +72,3 @@
dictionary CameraDevicePermissionDescriptor : DevicePermissionDescriptor {
boolean panTiltZoom = false;
};
-
-dictionary PermissionSetParameters {
- required PermissionDescriptor descriptor;
- required PermissionState state;
- boolean oneRealm = false;
-};
diff --git a/interfaces/pointerlock.idl b/interfaces/pointerlock.idl
index 873a965..0204bf5 100644
--- a/interfaces/pointerlock.idl
+++ b/interfaces/pointerlock.idl
@@ -18,11 +18,11 @@
};
partial interface MouseEvent {
- readonly attribute long movementX;
- readonly attribute long movementY;
+ readonly attribute double movementX;
+ readonly attribute double movementY;
};
partial dictionary MouseEventInit {
- long movementX = 0;
- long movementY = 0;
+ double movementX = 0;
+ double movementY = 0;
};
diff --git a/interfaces/portals.idl b/interfaces/portals.idl
index a88e6ac..5d85cce 100644
--- a/interfaces/portals.idl
+++ b/interfaces/portals.idl
@@ -11,13 +11,13 @@
[CEReactions] attribute DOMString referrerPolicy;
[NewObject] Promise<undefined> activate(optional PortalActivateOptions options = {});
- undefined postMessage(any message, optional PostMessageOptions options = {});
+ undefined postMessage(any message, optional StructuredSerializeOptions options = {});
attribute EventHandler onmessage;
attribute EventHandler onmessageerror;
};
-dictionary PortalActivateOptions : PostMessageOptions {
+dictionary PortalActivateOptions : StructuredSerializeOptions {
any data;
};
@@ -27,7 +27,7 @@
[Exposed=Window]
interface PortalHost : EventTarget {
- undefined postMessage(any message, optional PostMessageOptions options = {});
+ undefined postMessage(any message, optional StructuredSerializeOptions options = {});
attribute EventHandler onmessage;
attribute EventHandler onmessageerror;
diff --git a/interfaces/prefer-current-tab.idl b/interfaces/prefer-current-tab.idl
new file mode 100644
index 0000000..86445e5
--- /dev/null
+++ b/interfaces/prefer-current-tab.idl
@@ -0,0 +1,8 @@
+// GENERATED CONTENT - DO NOT EDIT
+// Content was automatically extracted by Reffy into webref
+// (https://github.com/w3c/webref)
+// Source: preferCurrentTab (https://wicg.github.io/prefer-current-tab/)
+
+partial dictionary MediaStreamConstraints {
+ boolean preferCurrentTab = false;
+};
diff --git a/interfaces/private-click-measurement.idl b/interfaces/private-click-measurement.idl
index 9a7c8dd..3bed7cc 100644
--- a/interfaces/private-click-measurement.idl
+++ b/interfaces/private-click-measurement.idl
@@ -5,5 +5,4 @@
partial interface HTMLAnchorElement {
[CEReactions] attribute unsigned long attributionSourceId;
- [CEReactions] attribute DOMString attributionDestination;
};
diff --git a/interfaces/resource-timing.idl b/interfaces/resource-timing.idl
index 1122668..235963b 100644
--- a/interfaces/resource-timing.idl
+++ b/interfaces/resource-timing.idl
@@ -5,28 +5,28 @@
[Exposed=(Window,Worker)]
interface PerformanceResourceTiming : PerformanceEntry {
- readonly attribute DOMString initiatorType;
- readonly attribute DOMString nextHopProtocol;
- readonly attribute DOMHighResTimeStamp workerStart;
- readonly attribute DOMHighResTimeStamp redirectStart;
- readonly attribute DOMHighResTimeStamp redirectEnd;
- readonly attribute DOMHighResTimeStamp fetchStart;
- readonly attribute DOMHighResTimeStamp domainLookupStart;
- readonly attribute DOMHighResTimeStamp domainLookupEnd;
- readonly attribute DOMHighResTimeStamp connectStart;
- readonly attribute DOMHighResTimeStamp connectEnd;
- readonly attribute DOMHighResTimeStamp secureConnectionStart;
- readonly attribute DOMHighResTimeStamp requestStart;
- readonly attribute DOMHighResTimeStamp responseStart;
- readonly attribute DOMHighResTimeStamp responseEnd;
- readonly attribute unsigned long long transferSize;
- readonly attribute unsigned long long encodedBodySize;
- readonly attribute unsigned long long decodedBodySize;
+ readonly attribute DOMString initiatorType;
+ readonly attribute ByteString nextHopProtocol;
+ readonly attribute DOMHighResTimeStamp workerStart;
+ readonly attribute DOMHighResTimeStamp redirectStart;
+ readonly attribute DOMHighResTimeStamp redirectEnd;
+ readonly attribute DOMHighResTimeStamp fetchStart;
+ readonly attribute DOMHighResTimeStamp domainLookupStart;
+ readonly attribute DOMHighResTimeStamp domainLookupEnd;
+ readonly attribute DOMHighResTimeStamp connectStart;
+ readonly attribute DOMHighResTimeStamp connectEnd;
+ readonly attribute DOMHighResTimeStamp secureConnectionStart;
+ readonly attribute DOMHighResTimeStamp requestStart;
+ readonly attribute DOMHighResTimeStamp responseStart;
+ readonly attribute DOMHighResTimeStamp responseEnd;
+ readonly attribute unsigned long long transferSize;
+ readonly attribute unsigned long long encodedBodySize;
+ readonly attribute unsigned long long decodedBodySize;
[Default] object toJSON();
};
partial interface Performance {
undefined clearResourceTimings ();
undefined setResourceTimingBufferSize (unsigned long maxSize);
- attribute EventHandler onresourcetimingbufferfull;
+ attribute EventHandler onresourcetimingbufferfull;
};
diff --git a/interfaces/sanitizer-api.idl b/interfaces/sanitizer-api.idl
new file mode 100644
index 0000000..b98da2a
--- /dev/null
+++ b/interfaces/sanitizer-api.idl
@@ -0,0 +1,33 @@
+// GENERATED CONTENT - DO NOT EDIT
+// Content was automatically extracted by Reffy into webref
+// (https://github.com/w3c/webref)
+// Source: HTML Sanitizer API (https://wicg.github.io/sanitizer-api/)
+
+[
+ Exposed=(Window),
+ SecureContext
+] interface Sanitizer {
+ constructor(optional SanitizerConfig config = {});
+
+ DocumentFragment sanitize((Document or DocumentFragment) input);
+ Element? sanitizeFor(DOMString element, DOMString input);
+
+ SanitizerConfig getConfiguration();
+ static SanitizerConfig getDefaultConfiguration();
+};
+
+partial interface Element {
+ undefined setHTML(DOMString input, Sanitizer sanitizer);
+};
+
+dictionary SanitizerConfig {
+ sequence<DOMString> allowElements;
+ sequence<DOMString> blockElements;
+ sequence<DOMString> dropElements;
+ AttributeMatchList allowAttributes;
+ AttributeMatchList dropAttributes;
+ boolean allowCustomElements;
+ boolean allowComments;
+};
+
+typedef record<DOMString, sequence<DOMString>> AttributeMatchList;
diff --git a/interfaces/scheduling-apis.idl b/interfaces/scheduling-apis.idl
index 82162b5..8722eba 100644
--- a/interfaces/scheduling-apis.idl
+++ b/interfaces/scheduling-apis.idl
@@ -34,9 +34,13 @@
required TaskPriority previousPriority;
};
+dictionary TaskControllerInit {
+ TaskPriority priority = "user-visible";
+};
+
[Exposed=(Window,Worker)]
interface TaskController : AbortController {
- constructor(optional TaskPriority priority = "user-visible");
+ constructor(optional TaskControllerInit init = {});
undefined setPriority(TaskPriority priority);
};
diff --git a/interfaces/screen-capture.idl b/interfaces/screen-capture.idl
index 38f077d..5fb7eb8 100644
--- a/interfaces/screen-capture.idl
+++ b/interfaces/screen-capture.idl
@@ -17,6 +17,7 @@
boolean logicalSurface = true;
boolean cursor = true;
boolean restrictOwnAudio = true;
+ boolean suppressLocalAudioPlayback = true;
};
partial dictionary MediaTrackConstraintSet {
@@ -24,6 +25,7 @@
ConstrainBoolean logicalSurface;
ConstrainDOMString cursor;
ConstrainBoolean restrictOwnAudio;
+ ConstrainBoolean suppressLocalAudioPlayback;
};
partial dictionary MediaTrackSettings {
diff --git a/interfaces/scroll-animations.idl b/interfaces/scroll-animations.idl
index 872c1dd..bdd4118 100644
--- a/interfaces/scroll-animations.idl
+++ b/interfaces/scroll-animations.idl
@@ -19,7 +19,6 @@
Element? source;
ScrollDirection orientation = "block";
sequence<ScrollTimelineOffset> scrollOffsets = [];
- (double or ScrollTimelineAutoKeyword) timeRange = "auto";
};
[Exposed=Window]
@@ -28,7 +27,6 @@
readonly attribute Element? source;
readonly attribute ScrollDirection orientation;
readonly attribute FrozenArray<ScrollTimelineOffset> scrollOffsets;
- readonly attribute (double or ScrollTimelineAutoKeyword) timeRange;
};
enum Edge { "start", "end" };
@@ -41,9 +39,8 @@
[Exposed=Window]
interface CSSScrollTimelineRule : CSSRule {
- readonly attribute CSSOMString name;
- readonly attribute CSSOMString source;
- readonly attribute CSSOMString orientation;
- readonly attribute CSSOMString scrollOffsets;
- readonly attribute CSSOMString timeRange;
+ readonly attribute CSSOMString name;
+ readonly attribute CSSOMString source;
+ readonly attribute CSSOMString orientation;
+ readonly attribute CSSOMString scrollOffsets;
};
diff --git a/interfaces/secure-payment-confirmation.idl b/interfaces/secure-payment-confirmation.idl
new file mode 100644
index 0000000..47ed64c
--- /dev/null
+++ b/interfaces/secure-payment-confirmation.idl
@@ -0,0 +1,45 @@
+// GENERATED CONTENT - DO NOT EDIT
+// Content was automatically extracted by Reffy into webref
+// (https://github.com/w3c/webref)
+// Source: Secure Payment Confirmation (https://w3c.github.io/secure-payment-confirmation)
+
+dictionary SecurePaymentConfirmationRequest {
+ required BufferSource challenge;
+ required FrozenArray<BufferSource> credentialIds;
+ required PaymentCredentialInstrument instrument;
+ unsigned long timeout;
+ required USVString payeeOrigin;
+ AuthenticationExtensionsClientInputs extensions;
+};
+
+partial dictionary AuthenticationExtensionsClientInputs {
+ AuthenticationExtensionsPaymentInputs payment;
+};
+
+dictionary AuthenticationExtensionsPaymentInputs {
+ boolean isPayment;
+
+ // Only used for authentication.
+ USVString rp;
+ USVString topOrigin;
+ USVString payeeOrigin;
+ PaymentCurrencyAmount total;
+ PaymentCredentialInstrument instrument;
+};
+
+dictionary CollectedClientPaymentData : CollectedClientData {
+ required CollectedClientAdditionalPaymentData payment;
+};
+
+dictionary CollectedClientAdditionalPaymentData {
+ required USVString rp;
+ required USVString topOrigin;
+ required USVString payeeOrigin;
+ required PaymentCurrencyAmount total;
+ required PaymentCredentialInstrument instrument;
+};
+
+dictionary PaymentCredentialInstrument {
+ required DOMString displayName;
+ required USVString icon;
+};
diff --git a/interfaces/service-workers.idl b/interfaces/service-workers.idl
index 6af2c3e..b50f6dd 100644
--- a/interfaces/service-workers.idl
+++ b/interfaces/service-workers.idl
@@ -8,7 +8,7 @@
readonly attribute USVString scriptURL;
readonly attribute ServiceWorkerState state;
undefined postMessage(any message, sequence<object> transfer);
- undefined postMessage(any message, optional PostMessageOptions options = {});
+ undefined postMessage(any message, optional StructuredSerializeOptions options = {});
// event
attribute EventHandler onstatechange;
@@ -115,7 +115,7 @@
readonly attribute DOMString id;
readonly attribute ClientType type;
undefined postMessage(any message, sequence<object> transfer);
- undefined postMessage(any message, optional PostMessageOptions options = {});
+ undefined postMessage(any message, optional StructuredSerializeOptions options = {});
};
[Exposed=ServiceWorker]
diff --git a/interfaces/streams.idl b/interfaces/streams.idl
index 99c3a5d..d411162 100644
--- a/interfaces/streams.idl
+++ b/interfaces/streams.idl
@@ -159,6 +159,8 @@
[Exposed=(Window,Worker,Worklet)]
interface WritableStreamDefaultController {
+ readonly attribute any abortReason;
+ readonly attribute AbortSignal signal;
undefined error(optional any e);
};
@@ -198,7 +200,7 @@
QueuingStrategySize size;
};
-callback QueuingStrategySize = unrestricted double (optional any chunk);
+callback QueuingStrategySize = unrestricted double (any chunk);
dictionary QueuingStrategyInit {
required unrestricted double highWaterMark;
diff --git a/interfaces/urlpattern.idl b/interfaces/urlpattern.idl
new file mode 100644
index 0000000..9e38ae1
--- /dev/null
+++ b/interfaces/urlpattern.idl
@@ -0,0 +1,54 @@
+// GENERATED CONTENT - DO NOT EDIT
+// Content was automatically extracted by Reffy into webref
+// (https://github.com/w3c/webref)
+// Source: URLPattern API (https://wicg.github.io/urlpattern/)
+
+typedef (USVString or URLPatternInit) URLPatternInput;
+
+[Exposed=(Window,Worker)]
+interface URLPattern {
+ constructor(optional URLPatternInput input = {}, optional USVString baseURL);
+
+ boolean test(optional URLPatternInput input = {}, optional USVString baseURL);
+
+ URLPatternResult? exec(optional URLPatternInput input = {}, optional USVString baseURL);
+
+ readonly attribute USVString protocol;
+ readonly attribute USVString username;
+ readonly attribute USVString password;
+ readonly attribute USVString hostname;
+ readonly attribute USVString port;
+ readonly attribute USVString pathname;
+ readonly attribute USVString search;
+ readonly attribute USVString hash;
+};
+
+dictionary URLPatternInit {
+ USVString protocol;
+ USVString username;
+ USVString password;
+ USVString hostname;
+ USVString port;
+ USVString pathname;
+ USVString search;
+ USVString hash;
+ USVString baseURL;
+};
+
+dictionary URLPatternResult {
+ sequence<URLPatternInput> inputs;
+
+ URLPatternComponentResult protocol;
+ URLPatternComponentResult username;
+ URLPatternComponentResult password;
+ URLPatternComponentResult hostname;
+ URLPatternComponentResult port;
+ URLPatternComponentResult pathname;
+ URLPatternComponentResult search;
+ URLPatternComponentResult hash;
+};
+
+dictionary URLPatternComponentResult {
+ USVString input;
+ record<USVString, USVString> groups;
+};
diff --git a/interfaces/uuid.idl b/interfaces/uuid.idl
new file mode 100644
index 0000000..92bed29
--- /dev/null
+++ b/interfaces/uuid.idl
@@ -0,0 +1,9 @@
+// GENERATED CONTENT - DO NOT EDIT
+// Content was automatically extracted by Reffy into webref
+// (https://github.com/w3c/webref)
+// Source: uuid (https://wicg.github.io/uuid/)
+
+[Exposed=(Window,Worker)]
+partial interface Crypto {
+ [SecureContext] DOMString randomUUID();
+};
diff --git a/interfaces/virtual-keyboard.idl b/interfaces/virtual-keyboard.idl
new file mode 100644
index 0000000..74dafc5
--- /dev/null
+++ b/interfaces/virtual-keyboard.idl
@@ -0,0 +1,21 @@
+// GENERATED CONTENT - DO NOT EDIT
+// Content was automatically extracted by Reffy into webref
+// (https://github.com/w3c/webref)
+// Source: VirtualKeyboard API (https://w3c.github.io/virtual-keyboard/)
+
+partial interface Navigator {
+ [SecureContext, SameObject] readonly attribute VirtualKeyboard virtualKeyboard;
+};
+
+[Exposed=Window, SecureContext]
+interface VirtualKeyboard : EventTarget {
+ undefined show();
+ undefined hide();
+ readonly attribute DOMRect boundingRect;
+ attribute boolean overlaysContent;
+ attribute EventHandler ongeometrychange;
+};
+
+partial interface mixin ElementContentEditable {
+ [CEReactions] attribute DOMString virtualKeyboardPolicy;
+};
diff --git a/interfaces/visual-viewport.idl b/interfaces/visual-viewport.idl
index e4507ae..516f8bd 100644
--- a/interfaces/visual-viewport.idl
+++ b/interfaces/visual-viewport.idl
@@ -20,7 +20,7 @@
readonly attribute double scale;
- readonly attribute FrozenArray<DOMRect>? segments;
+ readonly attribute FrozenArray<DOMRect> segments;
attribute EventHandler onresize;
attribute EventHandler onscroll;
diff --git a/interfaces/web-animations-2.idl b/interfaces/web-animations-2.idl
index bf4f9aa..2bc7aa4 100644
--- a/interfaces/web-animations-2.idl
+++ b/interfaces/web-animations-2.idl
@@ -5,6 +5,7 @@
[Exposed=Window]
partial interface AnimationTimeline {
+ readonly attribute CSSNumberish? duration;
Animation play (optional AnimationEffect? effect = null);
};
@@ -30,7 +31,11 @@
};
partial dictionary ComputedEffectTiming {
- double startTime;
+ CSSNumberish startTime;
+ CSSNumberish endTime;
+ CSSNumberish activeDuration;
+ CSSNumberish? localTime;
+ CSSNumberish? progress;
};
[Exposed=Window]
diff --git a/interfaces/web-animations.idl b/interfaces/web-animations.idl
index 6e973d1..626c823 100644
--- a/interfaces/web-animations.idl
+++ b/interfaces/web-animations.idl
@@ -86,10 +86,6 @@
enum PlaybackDirection { "normal", "reverse", "alternate", "alternate-reverse" };
dictionary ComputedEffectTiming : EffectTiming {
- unrestricted double endTime;
- unrestricted double activeDuration;
- double? localTime;
- double? progress;
unrestricted double? currentIteration;
};
diff --git a/interfaces/web-share.idl b/interfaces/web-share.idl
index 4d17f5b..6ba7407 100644
--- a/interfaces/web-share.idl
+++ b/interfaces/web-share.idl
@@ -5,6 +5,8 @@
partial interface Navigator {
[SecureContext] Promise<undefined> share(optional ShareData data = {});
+
+ [SecureContext] boolean canShare(optional ShareData data = {});
};
dictionary ShareData {
diff --git a/interfaces/webauthn.idl b/interfaces/webauthn.idl
index 07c8c5d..939b89b 100644
--- a/interfaces/webauthn.idl
+++ b/interfaces/webauthn.idl
@@ -120,7 +120,7 @@
required DOMString challenge;
required DOMString origin;
boolean crossOrigin;
- TokenBinding tokenBinding;
+
};
dictionary TokenBinding {
diff --git a/interfaces/webcodecs.idl b/interfaces/webcodecs.idl
index 16d6bd5..e042f19 100644
--- a/interfaces/webcodecs.idl
+++ b/interfaces/webcodecs.idl
@@ -3,7 +3,7 @@
// (https://github.com/w3c/webref)
// Source: WebCodecs (https://w3c.github.io/webcodecs/)
-[Exposed=(Window,DedicatedWorker)]
+[Exposed=(Window,DedicatedWorker), SecureContext]
interface AudioDecoder {
constructor(AudioDecoderInit init);
@@ -26,7 +26,7 @@
callback AudioDataOutputCallback = undefined(AudioData output);
-[Exposed=(Window,DedicatedWorker)]
+[Exposed=(Window,DedicatedWorker), SecureContext]
interface VideoDecoder {
constructor(VideoDecoderInit init);
@@ -49,7 +49,7 @@
callback VideoFrameOutputCallback = undefined(VideoFrame output);
-[Exposed=(Window,DedicatedWorker)]
+[Exposed=(Window,DedicatedWorker), SecureContext]
interface AudioEncoder {
constructor(AudioEncoderInit init);
@@ -78,7 +78,7 @@
AudioDecoderConfig decoderConfig;
};
-[Exposed=(Window,DedicatedWorker)]
+[Exposed=(Window,DedicatedWorker), SecureContext]
interface VideoEncoder {
constructor(VideoEncoderInit init);
@@ -105,6 +105,11 @@
dictionary EncodedVideoChunkMetadata {
VideoDecoderConfig decoderConfig;
+ SvcOutputMetadata svc;
+ BufferSource alphaSideData;
+};
+
+dictionary SvcOutputMetadata {
unsigned long temporalLayerId;
};
@@ -142,7 +147,9 @@
[EnforceRange] unsigned long codedHeight;
[EnforceRange] unsigned long displayAspectWidth;
[EnforceRange] unsigned long displayAspectHeight;
- HardwareAcceleration hardwareAcceleration = "allow";
+ VideoColorSpaceInit colorSpace;
+ HardwareAcceleration hardwareAcceleration = "no-preference";
+ boolean optimizeForLatency;
};
dictionary AudioEncoderConfig {
@@ -154,19 +161,33 @@
dictionary VideoEncoderConfig {
required DOMString codec;
- [EnforceRange] unsigned long long bitrate;
[EnforceRange] required unsigned long width;
[EnforceRange] required unsigned long height;
[EnforceRange] unsigned long displayWidth;
[EnforceRange] unsigned long displayHeight;
- HardwareAcceleration hardwareAcceleration = "allow";
+ [EnforceRange] unsigned long long bitrate;
+ [EnforceRange] double framerate;
+ HardwareAcceleration hardwareAcceleration = "no-preference";
+ AlphaOption alpha = "discard";
DOMString scalabilityMode;
+ BitrateMode bitrateMode = "variable";
+ LatencyMode latencyMode = "quality";
};
enum HardwareAcceleration {
- "allow",
- "deny",
- "require",
+ "no-preference",
+ "prefer-hardware",
+ "prefer-software",
+};
+
+enum AlphaOption {
+ "keep",
+ "discard",
+};
+
+enum LatencyMode {
+ "quality",
+ "realtime"
};
dictionary VideoEncoderEncodeOptions {
@@ -185,8 +206,8 @@
interface EncodedAudioChunk {
constructor(EncodedAudioChunkInit init);
readonly attribute EncodedAudioChunkType type;
- readonly attribute long long timestamp; // microseconds
- readonly attribute unsigned long duration; // microseconds
+ readonly attribute long long timestamp; // microseconds
+ readonly attribute unsigned long long? duration; // microseconds
readonly attribute unsigned long byteLength;
undefined copyTo([AllowShared] BufferSource destination);
@@ -195,6 +216,7 @@
dictionary EncodedAudioChunkInit {
required EncodedAudioChunkType type;
[EnforceRange] required long long timestamp; // microseconds
+ [EnforceRange] unsigned long long duration; // microseconds
required BufferSource data;
};
@@ -226,11 +248,11 @@
"delta",
};
-[Exposed=(Window,DedicatedWorker)]
+[Exposed=(Window,DedicatedWorker), Serializable, Transferable]
interface AudioData {
constructor(AudioDataInit init);
- readonly attribute AudioSampleFormat format;
+ readonly attribute AudioSampleFormat? format;
readonly attribute float sampleRate;
readonly attribute unsigned long numberOfFrames;
readonly attribute unsigned long numberOfChannels;
@@ -245,7 +267,7 @@
dictionary AudioDataInit {
required AudioSampleFormat format;
- [EnforceRange] required float sampleRate;
+ required float sampleRate;
[EnforceRange] required unsigned long numberOfFrames;
[EnforceRange] required unsigned long numberOfChannels;
[EnforceRange] required long long timestamp; // microseconds
@@ -253,43 +275,44 @@
};
dictionary AudioDataCopyToOptions {
- required unsigned long planeIndex;
- unsigned long frameOffset = 0;
- unsigned long frameCount;
+ [EnforceRange] required unsigned long planeIndex;
+ [EnforceRange] unsigned long frameOffset = 0;
+ [EnforceRange] unsigned long frameCount;
+ AudioSampleFormat format;
};
enum AudioSampleFormat {
- "U8",
- "S16",
- "S24",
- "S32",
- "FLT",
- "U8P",
- "S16P",
- "S24P",
- "S32P",
- "FLTP",
+ "u8",
+ "s16",
+ "s32",
+ "f32",
+ "u8-planar",
+ "s16-planar",
+ "s32-planar",
+ "f32-planar",
};
-[Exposed=(Window,DedicatedWorker)]
+[Exposed=(Window,DedicatedWorker), Serializable, Transferable]
interface VideoFrame {
constructor(CanvasImageSource image, optional VideoFrameInit init = {});
- constructor(sequence<(Plane or PlaneInit)> planes,
- VideoFramePlaneInit init);
+ constructor([AllowShared] BufferSource data, VideoFrameBufferInit init);
- readonly attribute PixelFormat format;
- readonly attribute FrozenArray<Plane>? planes;
+ readonly attribute VideoPixelFormat? format;
readonly attribute unsigned long codedWidth;
readonly attribute unsigned long codedHeight;
- readonly attribute unsigned long cropLeft;
- readonly attribute unsigned long cropTop;
- readonly attribute unsigned long cropWidth;
- readonly attribute unsigned long cropHeight;
+ readonly attribute DOMRectReadOnly? codedRect;
+ readonly attribute DOMRectReadOnly? visibleRect;
readonly attribute unsigned long displayWidth;
readonly attribute unsigned long displayHeight;
readonly attribute unsigned long long? duration; // microseconds
readonly attribute long long? timestamp; // microseconds
+ readonly attribute VideoColorSpace colorSpace;
+ unsigned long allocationSize(
+ optional VideoFrameCopyToOptions options = {});
+ Promise<sequence<PlaneLayout>> copyTo(
+ [AllowShared] BufferSource destination,
+ optional VideoFrameCopyToOptions options = {});
VideoFrame clone();
undefined close();
};
@@ -297,42 +320,108 @@
dictionary VideoFrameInit {
unsigned long long duration; // microseconds
long long timestamp; // microseconds
-};
+ AlphaOption alpha = "keep";
-dictionary VideoFramePlaneInit {
- required PixelFormat format;
- [EnforceRange] required unsigned long codedWidth;
- [EnforceRange] required unsigned long codedHeight;
- [EnforceRange] unsigned long cropLeft;
- [EnforceRange] unsigned long cropTop;
- [EnforceRange] unsigned long cropWidth;
- [EnforceRange] unsigned long cropHeight;
+ // Default matches image. May be used to efficiently crop. Will trigger
+ // new computation of displayWidth and displayHeight using image’s pixel
+ // aspect ratio unless an explicit displayWidth and displayHeight are given.
+ DOMRectInit visibleRect;
+
+ // Default matches image unless visibleRect is provided.
[EnforceRange] unsigned long displayWidth;
[EnforceRange] unsigned long displayHeight;
+};
+
+dictionary VideoFrameBufferInit {
+ required VideoPixelFormat format;
+ required [EnforceRange] unsigned long codedWidth;
+ required [EnforceRange] unsigned long codedHeight;
+ required [EnforceRange] long long timestamp; // microseconds
[EnforceRange] unsigned long long duration; // microseconds
- [EnforceRange] long long timestamp; // microseconds
+
+ // Default layout is tightly-packed.
+ sequence<PlaneLayout> layout;
+
+ // Default visible rect is coded size positioned at (0,0)
+ DOMRectInit visibleRect;
+
+ // Default display dimensions match visibleRect.
+ [EnforceRange] unsigned long displayWidth;
+ [EnforceRange] unsigned long displayHeight;
+
+ VideoColorSpaceInit colorSpace;
};
-[Exposed=(Window,DedicatedWorker)]
-interface Plane {
- readonly attribute unsigned long stride;
- readonly attribute unsigned long rows;
- readonly attribute unsigned long length;
-
- undefined readInto(ArrayBufferView dst);
+dictionary VideoFrameCopyToOptions {
+ DOMRectInit rect;
+ sequence<PlaneLayout> layout;
};
-dictionary PlaneInit {
- required BufferSource src;
+dictionary PlaneLayout {
+ [EnforceRange] required unsigned long offset;
[EnforceRange] required unsigned long stride;
- [EnforceRange] required unsigned long rows;
};
-enum PixelFormat {
- "I420"
+enum VideoPixelFormat {
+ // 4:2:0 Y, U, V
+ "I420",
+ // 4:2:0 Y, U, V, A
+ "I420A",
+ // 4:2:2 Y, U, V
+ "I422",
+ // 4:4:4 Y, U, V
+ "I444",
+ // 4:2:0 Y, UV
+ "NV12",
+ // 32bpp RGBA
+ "RGBA",
+ // 32bpp RGBX (opaque)
+ "RGBX",
+ // 32bpp BGRA
+ "BGRA",
+ // 32bpp BGRX (opaque)
+ "BGRX",
};
[Exposed=(Window,DedicatedWorker)]
+interface VideoColorSpace {
+ constructor(optional VideoColorSpaceInit init = {});
+
+ readonly attribute VideoColorPrimaries? primaries;
+ readonly attribute VideoTransferCharacteristics? transfer;
+ readonly attribute VideoMatrixCoefficients? matrix;
+ readonly attribute boolean? fullRange;
+
+ [Default] VideoColorSpaceInit toJSON();
+};
+
+dictionary VideoColorSpaceInit {
+ VideoColorPrimaries primaries;
+ VideoTransferCharacteristics transfer;
+ VideoMatrixCoefficients matrix;
+ boolean fullRange;
+};
+
+enum VideoColorPrimaries {
+ "bt709", // BT.709, sRGB
+ "bt470bg", // BT.601 PAL
+ "smpte170m", // BT.601 NTSC
+};
+
+enum VideoTransferCharacteristics {
+ "bt709", // BT.709
+ "smpte170m", // BT.601 (functionally the same as bt709)
+ "iec61966-2-1", // sRGB
+};
+
+enum VideoMatrixCoefficients {
+ "rgb", // sRGB
+ "bt709", // BT.709
+ "bt470bg", // BT.601 PAL
+ "smpte170m", // BT.601 NTSC (functionally the same as bt470bg)
+};
+
+[Exposed=(Window,DedicatedWorker), SecureContext]
interface ImageDecoder {
constructor(ImageDecoderInit init);
diff --git a/interfaces/webgl1.idl b/interfaces/webgl1.idl
index cd9eaa1..bebb864 100644
--- a/interfaces/webgl1.idl
+++ b/interfaces/webgl1.idl
@@ -86,7 +86,8 @@
HTMLImageElement or
HTMLCanvasElement or
HTMLVideoElement or
- OffscreenCanvas) TexImageSource;
+ OffscreenCanvas or
+ VideoFrame) TexImageSource;
typedef ([AllowShared] Float32Array or sequence<GLfloat>) Float32List;
typedef ([AllowShared] Int32Array or sequence<GLint>) Int32List;
@@ -512,8 +513,7 @@
const GLenum UNPACK_COLORSPACE_CONVERSION_WEBGL = 0x9243;
const GLenum BROWSER_DEFAULT_WEBGL = 0x9244;
- [Exposed=Window] readonly attribute (HTMLCanvasElement or OffscreenCanvas) canvas;
- [Exposed=Worker] readonly attribute OffscreenCanvas canvas;
+ readonly attribute (HTMLCanvasElement or OffscreenCanvas) canvas;
readonly attribute GLsizei drawingBufferWidth;
readonly attribute GLsizei drawingBufferHeight;
diff --git a/interfaces/webgpu.idl b/interfaces/webgpu.idl
index 9141df0..ffcd65c 100644
--- a/interfaces/webgpu.idl
+++ b/interfaces/webgpu.idl
@@ -11,7 +11,7 @@
USVString label;
};
-[Exposed=Window]
+[Exposed=(Window, DedicatedWorker)]
interface GPUSupportedLimits {
readonly attribute unsigned long maxTextureDimension1D;
readonly attribute unsigned long maxTextureDimension2D;
@@ -25,14 +25,23 @@
readonly attribute unsigned long maxStorageBuffersPerShaderStage;
readonly attribute unsigned long maxStorageTexturesPerShaderStage;
readonly attribute unsigned long maxUniformBuffersPerShaderStage;
- readonly attribute unsigned long maxUniformBufferBindingSize;
- readonly attribute unsigned long maxStorageBufferBindingSize;
+ readonly attribute unsigned long long maxUniformBufferBindingSize;
+ readonly attribute unsigned long long maxStorageBufferBindingSize;
+ readonly attribute unsigned long minUniformBufferOffsetAlignment;
+ readonly attribute unsigned long minStorageBufferOffsetAlignment;
readonly attribute unsigned long maxVertexBuffers;
readonly attribute unsigned long maxVertexAttributes;
readonly attribute unsigned long maxVertexBufferArrayStride;
+ readonly attribute unsigned long maxInterStageShaderComponents;
+ readonly attribute unsigned long maxComputeWorkgroupStorageSize;
+ readonly attribute unsigned long maxComputeInvocationsPerWorkgroup;
+ readonly attribute unsigned long maxComputeWorkgroupSizeX;
+ readonly attribute unsigned long maxComputeWorkgroupSizeY;
+ readonly attribute unsigned long maxComputeWorkgroupSizeZ;
+ readonly attribute unsigned long maxComputeWorkgroupsPerDimension;
};
-[Exposed=Window]
+[Exposed=(Window, DedicatedWorker)]
interface GPUSupportedFeatures {
readonly setlike<DOMString>;
};
@@ -42,19 +51,19 @@
};
interface mixin NavigatorGPU {
- [SameObject] readonly attribute GPU gpu;
+ [SameObject, SecureContext] readonly attribute GPU gpu;
};
Navigator includes NavigatorGPU;
WorkerNavigator includes NavigatorGPU;
-[Exposed=(Window, DedicatedWorker)]
+[Exposed=(Window, DedicatedWorker), SecureContext]
interface GPU {
Promise<GPUAdapter?> requestAdapter(optional GPURequestAdapterOptions options = {});
};
dictionary GPURequestAdapterOptions {
GPUPowerPreference powerPreference;
- boolean forceSoftware = false;
+ boolean forceFallbackAdapter = false;
};
enum GPUPowerPreference {
@@ -62,19 +71,19 @@
"high-performance"
};
-[Exposed=Window]
+[Exposed=(Window, DedicatedWorker), SecureContext]
interface GPUAdapter {
readonly attribute DOMString name;
[SameObject] readonly attribute GPUSupportedFeatures features;
[SameObject] readonly attribute GPUSupportedLimits limits;
- readonly attribute boolean isSoftware;
+ readonly attribute boolean isFallbackAdapter;
Promise<GPUDevice> requestDevice(optional GPUDeviceDescriptor descriptor = {});
};
dictionary GPUDeviceDescriptor : GPUObjectDescriptorBase {
- sequence<GPUFeatureName> nonGuaranteedFeatures = [];
- record<DOMString, GPUSize32> nonGuaranteedLimits = {};
+ sequence<GPUFeatureName> requiredFeatures = [];
+ record<DOMString, GPUSize64> requiredLimits = {};
};
enum GPUFeatureName {
@@ -86,7 +95,7 @@
"timestamp-query",
};
-[Exposed=(Window, DedicatedWorker), Serializable]
+[Exposed=(Window, DedicatedWorker), SecureContext]
interface GPUDevice : EventTarget {
[SameObject] readonly attribute GPUSupportedFeatures features;
[SameObject] readonly attribute GPUSupportedLimits limits;
@@ -117,7 +126,7 @@
};
GPUDevice includes GPUObjectBase;
-[Exposed=Window, Serializable]
+[Exposed=(Window, DedicatedWorker), SecureContext]
interface GPUBuffer {
Promise<undefined> mapAsync(GPUMapModeFlags mode, optional GPUSize64 offset = 0, optional GPUSize64 size);
ArrayBuffer getMappedRange(optional GPUSize64 offset = 0, optional GPUSize64 size);
@@ -134,7 +143,7 @@
};
typedef [EnforceRange] unsigned long GPUBufferUsageFlags;
-[Exposed=Window]
+[Exposed=(Window, DedicatedWorker)]
interface GPUBufferUsage {
const GPUFlagsConstant MAP_READ = 0x0001;
const GPUFlagsConstant MAP_WRITE = 0x0002;
@@ -149,13 +158,13 @@
};
typedef [EnforceRange] unsigned long GPUMapModeFlags;
-[Exposed=Window]
+[Exposed=(Window, DedicatedWorker)]
interface GPUMapMode {
const GPUFlagsConstant READ = 0x0001;
const GPUFlagsConstant WRITE = 0x0002;
};
-[Exposed=Window, Serializable]
+[Exposed=(Window, DedicatedWorker), SecureContext]
interface GPUTexture {
GPUTextureView createView(optional GPUTextureViewDescriptor descriptor = {});
@@ -179,16 +188,16 @@
};
typedef [EnforceRange] unsigned long GPUTextureUsageFlags;
-[Exposed=Window]
+[Exposed=(Window, DedicatedWorker)]
interface GPUTextureUsage {
const GPUFlagsConstant COPY_SRC = 0x01;
const GPUFlagsConstant COPY_DST = 0x02;
- const GPUFlagsConstant SAMPLED = 0x04;
- const GPUFlagsConstant STORAGE = 0x08;
+ const GPUFlagsConstant TEXTURE_BINDING = 0x04;
+ const GPUFlagsConstant STORAGE_BINDING = 0x08;
const GPUFlagsConstant RENDER_ATTACHMENT = 0x10;
};
-[Exposed=Window]
+[Exposed=(Window, DedicatedWorker), SecureContext]
interface GPUTextureView {
};
GPUTextureView includes GPUObjectBase;
@@ -297,7 +306,7 @@
"depth32float-stencil8",
};
-[Exposed=Window]
+[Exposed=(Window, DedicatedWorker), SecureContext]
interface GPUExternalTexture {
};
GPUExternalTexture includes GPUObjectBase;
@@ -307,7 +316,7 @@
GPUPredefinedColorSpace colorSpace = "srgb";
};
-[Exposed=Window]
+[Exposed=(Window, DedicatedWorker), SecureContext]
interface GPUSampler {
};
GPUSampler includes GPUObjectBase;
@@ -320,7 +329,7 @@
GPUFilterMode minFilter = "nearest";
GPUFilterMode mipmapFilter = "nearest";
float lodMinClamp = 0;
- float lodMaxClamp = 0xffffffff; // TODO: What should this be? Was Number.MAX_VALUE.
+ float lodMaxClamp = 32;
GPUCompareFunction compare;
[Clamp] unsigned short maxAnisotropy = 1;
};
@@ -347,7 +356,7 @@
"always"
};
-[Exposed=Window, Serializable]
+[Exposed=(Window, DedicatedWorker), SecureContext]
interface GPUBindGroupLayout {
};
GPUBindGroupLayout includes GPUObjectBase;
@@ -357,7 +366,7 @@
};
typedef [EnforceRange] unsigned long GPUShaderStageFlags;
-[Exposed=Window]
+[Exposed=(Window, DedicatedWorker)]
interface GPUShaderStage {
const GPUFlagsConstant VERTEX = 0x1;
const GPUFlagsConstant FRAGMENT = 0x2;
@@ -412,12 +421,11 @@
};
enum GPUStorageTextureAccess {
- "read-only",
"write-only",
};
dictionary GPUStorageTextureBindingLayout {
- required GPUStorageTextureAccess access;
+ GPUStorageTextureAccess access = "write-only";
required GPUTextureFormat format;
GPUTextureViewDimension viewDimension = "2d";
};
@@ -425,7 +433,7 @@
dictionary GPUExternalTextureBindingLayout {
};
-[Exposed=Window]
+[Exposed=(Window, DedicatedWorker), SecureContext]
interface GPUBindGroup {
};
GPUBindGroup includes GPUObjectBase;
@@ -448,7 +456,7 @@
GPUSize64 size;
};
-[Exposed=Window, Serializable]
+[Exposed=(Window, DedicatedWorker), SecureContext]
interface GPUPipelineLayout {
};
GPUPipelineLayout includes GPUObjectBase;
@@ -457,7 +465,7 @@
required sequence<GPUBindGroupLayout> bindGroupLayouts;
};
-[Exposed=Window, Serializable]
+[Exposed=(Window, DedicatedWorker), SecureContext]
interface GPUShaderModule {
Promise<GPUCompilationInfo> compilationInfo();
};
@@ -474,7 +482,7 @@
"info"
};
-[Exposed=Window, Serializable]
+[Exposed=(Window, DedicatedWorker), Serializable, SecureContext]
interface GPUCompilationMessage {
readonly attribute DOMString message;
readonly attribute GPUCompilationMessageType type;
@@ -484,7 +492,7 @@
readonly attribute unsigned long long length;
};
-[Exposed=Window, Serializable]
+[Exposed=(Window, DedicatedWorker), Serializable, SecureContext]
interface GPUCompilationInfo {
readonly attribute FrozenArray<GPUCompilationMessage> messages;
};
@@ -505,7 +513,7 @@
typedef double GPUPipelineConstantValue; // May represent WGSL’s bool, f32, i32, u32.
-[Exposed=Window, Serializable]
+[Exposed=(Window, DedicatedWorker), SecureContext]
interface GPUComputePipeline {
};
GPUComputePipeline includes GPUObjectBase;
@@ -515,7 +523,7 @@
required GPUProgrammableStage compute;
};
-[Exposed=Window, Serializable]
+[Exposed=(Window, DedicatedWorker), SecureContext]
interface GPURenderPipeline {
};
GPURenderPipeline includes GPUObjectBase;
@@ -581,7 +589,7 @@
};
typedef [EnforceRange] unsigned long GPUColorWriteFlags;
-[Exposed=Window]
+[Exposed=(Window, DedicatedWorker)]
interface GPUColorWrite {
const GPUFlagsConstant RED = 0x1;
const GPUFlagsConstant GREEN = 0x2;
@@ -591,9 +599,9 @@
};
dictionary GPUBlendComponent {
+ GPUBlendOperation operation = "add";
GPUBlendFactor srcFactor = "one";
GPUBlendFactor dstFactor = "zero";
- GPUBlendOperation operation = "add";
};
enum GPUBlendFactor {
@@ -693,7 +701,7 @@
"sint32x4",
};
-enum GPUInputStepMode {
+enum GPUVertexStepMode {
"vertex",
"instance"
};
@@ -704,7 +712,7 @@
dictionary GPUVertexBufferLayout {
required GPUSize64 arrayStride;
- GPUInputStepMode stepMode = "vertex";
+ GPUVertexStepMode stepMode = "vertex";
required sequence<GPUVertexAttribute> attributes;
};
@@ -715,7 +723,7 @@
required GPUIndex32 shaderLocation;
};
-[Exposed=Window]
+[Exposed=(Window, DedicatedWorker), SecureContext]
interface GPUCommandBuffer {
readonly attribute Promise<double> executionTime;
};
@@ -724,7 +732,7 @@
dictionary GPUCommandBufferDescriptor : GPUObjectDescriptorBase {
};
-[Exposed=Window]
+[Exposed=(Window, DedicatedWorker), SecureContext]
interface GPUCommandEncoder {
GPURenderPassEncoder beginRenderPass(GPURenderPassDescriptor descriptor);
GPUComputePassEncoder beginComputePass(optional GPUComputePassDescriptor descriptor = {});
@@ -770,8 +778,6 @@
dictionary GPUCommandEncoderDescriptor : GPUObjectDescriptorBase {
boolean measureExecutionTime = false;
-
- // TODO: reusability flag?
};
dictionary GPUImageDataLayout {
@@ -791,6 +797,11 @@
GPUTextureAspect aspect = "all";
};
+dictionary GPUImageCopyTextureTagged : GPUImageCopyTexture {
+ GPUPredefinedColorSpace colorSpace = "srgb";
+ boolean premultipliedAlpha = false;
+};
+
dictionary GPUImageCopyExternalImage {
required (ImageBitmap or HTMLCanvasElement or OffscreenCanvas) source;
GPUOrigin2D origin = {};
@@ -810,7 +821,7 @@
undefined insertDebugMarker(USVString markerLabel);
};
-[Exposed=Window]
+[Exposed=(Window, DedicatedWorker), SecureContext]
interface GPUComputePassEncoder {
undefined setPipeline(GPUComputePipeline pipeline);
undefined dispatch(GPUSize32 x, optional GPUSize32 y = 1, optional GPUSize32 z = 1);
@@ -832,8 +843,8 @@
interface mixin GPURenderEncoderBase {
undefined setPipeline(GPURenderPipeline pipeline);
- undefined setIndexBuffer(GPUBuffer buffer, GPUIndexFormat indexFormat, optional GPUSize64 offset = 0, optional GPUSize64 size = 0);
- undefined setVertexBuffer(GPUIndex32 slot, GPUBuffer buffer, optional GPUSize64 offset = 0, optional GPUSize64 size = 0);
+ undefined setIndexBuffer(GPUBuffer buffer, GPUIndexFormat indexFormat, optional GPUSize64 offset = 0, optional GPUSize64 size);
+ undefined setVertexBuffer(GPUIndex32 slot, GPUBuffer buffer, optional GPUSize64 offset = 0, optional GPUSize64 size);
undefined draw(GPUSize32 vertexCount, optional GPUSize32 instanceCount = 1,
optional GPUSize32 firstVertex = 0, optional GPUSize32 firstInstance = 0);
@@ -846,7 +857,7 @@
undefined drawIndexedIndirect(GPUBuffer indirectBuffer, GPUSize64 indirectOffset);
};
-[Exposed=Window]
+[Exposed=(Window, DedicatedWorker), SecureContext]
interface GPURenderPassEncoder {
undefined setViewport(float x, float y,
float width, float height,
@@ -908,7 +919,13 @@
"discard"
};
-[Exposed=Window]
+dictionary GPURenderPassLayout: GPUObjectDescriptorBase {
+ required sequence<GPUTextureFormat> colorFormats;
+ GPUTextureFormat depthStencilFormat;
+ GPUSize32 sampleCount = 1;
+};
+
+[Exposed=(Window, DedicatedWorker), SecureContext]
interface GPURenderBundle {
};
GPURenderBundle includes GPUObjectBase;
@@ -916,7 +933,7 @@
dictionary GPURenderBundleDescriptor : GPUObjectDescriptorBase {
};
-[Exposed=Window]
+[Exposed=(Window, DedicatedWorker), SecureContext]
interface GPURenderBundleEncoder {
GPURenderBundle finish(optional GPURenderBundleDescriptor descriptor = {});
};
@@ -924,13 +941,12 @@
GPURenderBundleEncoder includes GPUProgrammablePassEncoder;
GPURenderBundleEncoder includes GPURenderEncoderBase;
-dictionary GPURenderBundleEncoderDescriptor : GPUObjectDescriptorBase {
- required sequence<GPUTextureFormat> colorFormats;
- GPUTextureFormat depthStencilFormat;
- GPUSize32 sampleCount = 1;
+dictionary GPURenderBundleEncoderDescriptor : GPURenderPassLayout {
+ boolean depthReadOnly = false;
+ boolean stencilReadOnly = false;
};
-[Exposed=Window]
+[Exposed=(Window, DedicatedWorker), SecureContext]
interface GPUQueue {
undefined submit(sequence<GPUCommandBuffer> commandBuffers);
@@ -951,12 +967,12 @@
undefined copyExternalImageToTexture(
GPUImageCopyExternalImage source,
- GPUImageCopyTexture destination,
+ GPUImageCopyTextureTagged destination,
GPUExtent3D copySize);
};
GPUQueue includes GPUObjectBase;
-[Exposed=Window]
+[Exposed=(Window, DedicatedWorker), SecureContext]
interface GPUQuerySet {
undefined destroy();
};
@@ -982,11 +998,15 @@
"compute-shader-invocations"
};
-[Exposed=Window]
+[Exposed=(Window, DedicatedWorker), SecureContext]
interface GPUCanvasContext {
- GPUSwapChain configureSwapChain(GPUSwapChainDescriptor descriptor);
+ readonly attribute (HTMLCanvasElement or OffscreenCanvas) canvas;
- GPUTextureFormat getSwapChainPreferredFormat(GPUAdapter adapter);
+ undefined configure(GPUCanvasConfiguration configuration);
+ undefined unconfigure();
+
+ GPUTextureFormat getPreferredFormat(GPUAdapter adapter);
+ GPUTexture getCurrentTexture();
};
enum GPUCanvasCompositingAlphaMode {
@@ -994,25 +1014,20 @@
"premultiplied",
};
-dictionary GPUSwapChainDescriptor : GPUObjectDescriptorBase {
+dictionary GPUCanvasConfiguration {
required GPUDevice device;
required GPUTextureFormat format;
GPUTextureUsageFlags usage = 0x10; // GPUTextureUsage.RENDER_ATTACHMENT
+ GPUPredefinedColorSpace colorSpace = "srgb";
GPUCanvasCompositingAlphaMode compositingAlphaMode = "opaque";
GPUExtent3D size;
};
-[Exposed=Window]
-interface GPUSwapChain {
- GPUTexture getCurrentTexture();
-};
-GPUSwapChain includes GPUObjectBase;
-
enum GPUDeviceLostReason {
"destroyed",
};
-[Exposed=Window]
+[Exposed=(Window, DedicatedWorker)]
interface GPUDeviceLostInfo {
readonly attribute (GPUDeviceLostReason or undefined) reason;
readonly attribute DOMString message;
@@ -1027,12 +1042,12 @@
"validation"
};
-[Exposed=Window]
+[Exposed=(Window, DedicatedWorker)]
interface GPUOutOfMemoryError {
constructor();
};
-[Exposed=Window]
+[Exposed=(Window, DedicatedWorker)]
interface GPUValidationError {
constructor(DOMString message);
readonly attribute DOMString message;
diff --git a/interfaces/webhid.idl b/interfaces/webhid.idl
index ffc9609..d4ce439 100644
--- a/interfaces/webhid.idl
+++ b/interfaces/webhid.idl
@@ -3,21 +3,11 @@
// (https://github.com/w3c/webref)
// Source: WebHID API (https://wicg.github.io/webhid/)
-dictionary HIDDeviceFilter {
- unsigned long vendorId;
- unsigned short productId;
- unsigned short usagePage;
- unsigned short usage;
+[SecureContext] partial interface Navigator {
+ [SameObject] readonly attribute HID hid;
};
-dictionary HIDDeviceRequestOptions {
- required sequence<HIDDeviceFilter> filters;
-};
-
-[
- Exposed=Window,
- SecureContext
-]
+[Exposed=Window, SecureContext]
interface HID : EventTarget {
attribute EventHandler onconnect;
attribute EventHandler ondisconnect;
@@ -26,20 +16,50 @@
HIDDeviceRequestOptions options);
};
-[SecureContext] partial interface Navigator {
- [SameObject] readonly attribute HID hid;
+dictionary HIDDeviceRequestOptions {
+ required sequence<HIDDeviceFilter> filters;
+};
+
+dictionary HIDDeviceFilter {
+ unsigned long vendorId;
+ unsigned short productId;
+ unsigned short usagePage;
+ unsigned short usage;
+};
+
+[Exposed=Window, SecureContext]
+interface HIDDevice : EventTarget {
+ attribute EventHandler oninputreport;
+ readonly attribute boolean opened;
+ readonly attribute unsigned short vendorId;
+ readonly attribute unsigned short productId;
+ readonly attribute DOMString productName;
+ readonly attribute FrozenArray<HIDCollectionInfo> collections;
+ Promise<undefined> open();
+ Promise<undefined> close();
+ Promise<undefined> sendReport([EnforceRange] octet reportId, BufferSource data);
+ Promise<undefined> sendFeatureReport(
+ [EnforceRange] octet reportId,
+ BufferSource data);
+ Promise<DataView> receiveFeatureReport([EnforceRange] octet reportId);
+};
+
+[Exposed=Window, SecureContext]
+interface HIDConnectionEvent : Event {
+ constructor(DOMString type, HIDConnectionEventInit eventInitDict);
+ [SameObject] readonly attribute HIDDevice device;
};
dictionary HIDConnectionEventInit : EventInit {
required HIDDevice device;
};
-[
- Exposed=Window,
- SecureContext
-] interface HIDConnectionEvent : Event {
- constructor(DOMString type, HIDConnectionEventInit eventInitDict);
+[Exposed=Window, SecureContext]
+interface HIDInputReportEvent : Event {
+ constructor(DOMString type, HIDInputReportEventInit eventInitDict);
[SameObject] readonly attribute HIDDevice device;
+ readonly attribute octet reportId;
+ readonly attribute DataView data;
};
dictionary HIDInputReportEventInit : EventInit {
@@ -48,19 +68,19 @@
required DataView data;
};
-[
- Exposed=Window,
- SecureContext
-] interface HIDInputReportEvent : Event {
- constructor(DOMString type, HIDInputReportEventInit eventInitDict);
- [SameObject] readonly attribute HIDDevice device;
- readonly attribute octet reportId;
- readonly attribute DataView data;
+dictionary HIDCollectionInfo {
+ unsigned short usagePage;
+ unsigned short usage;
+ octet type;
+ sequence<HIDCollectionInfo> children;
+ sequence<HIDReportInfo> inputReports;
+ sequence<HIDReportInfo> outputReports;
+ sequence<HIDReportInfo> featureReports;
};
-enum HIDUnitSystem {
- "none", "si-linear", "si-rotation", "english-linear",
- "english-rotation", "vendor-defined", "reserved"
+dictionary HIDReportInfo {
+ octet reportId;
+ sequence<HIDReportItem> items;
};
dictionary HIDReportItem {
@@ -94,34 +114,7 @@
sequence<DOMString> strings;
};
-dictionary HIDReportInfo {
- octet reportId;
- sequence<HIDReportItem> items;
-};
-
-dictionary HIDCollectionInfo {
- unsigned short usagePage;
- unsigned short usage;
- octet type;
- sequence<HIDCollectionInfo> children;
- sequence<HIDReportInfo> inputReports;
- sequence<HIDReportInfo> outputReports;
- sequence<HIDReportInfo> featureReports;
-};
-
-[
- Exposed=Window,
- SecureContext
-] interface HIDDevice : EventTarget {
- attribute EventHandler oninputreport;
- readonly attribute boolean opened;
- readonly attribute unsigned short vendorId;
- readonly attribute unsigned short productId;
- readonly attribute DOMString productName;
- readonly attribute FrozenArray<HIDCollectionInfo> collections;
- Promise<undefined> open();
- Promise<undefined> close();
- Promise<undefined> sendReport([EnforceRange] octet reportId, BufferSource data);
- Promise<undefined> sendFeatureReport([EnforceRange] octet reportId, BufferSource data);
- Promise<DataView> receiveFeatureReport([EnforceRange] octet reportId);
+enum HIDUnitSystem {
+ "none", "si-linear", "si-rotation", "english-linear",
+ "english-rotation", "vendor-defined", "reserved"
};
diff --git a/interfaces/webnn.idl b/interfaces/webnn.idl
new file mode 100644
index 0000000..dbd64c1
--- /dev/null
+++ b/interfaces/webnn.idl
@@ -0,0 +1,453 @@
+// GENERATED CONTENT - DO NOT EDIT
+// Content was automatically extracted by Reffy into webref
+// (https://github.com/w3c/webref)
+// Source: Web Neural Network API (https://webmachinelearning.github.io/webnn/)
+
+interface mixin NavigatorML {
+ [SecureContext, SameObject] readonly attribute ML ml;
+};
+Navigator includes NavigatorML;
+WorkerNavigator includes NavigatorML;
+
+enum MLDevicePreference {
+ "default",
+ "gpu",
+ "cpu"
+};
+
+enum MLPowerPreference {
+ // Let the user agent select the most suitable behavior.
+ "default",
+
+ // Prioritizes execution speed over power consumption.
+ "high-performance",
+
+ // Prioritizes power consumption over other considerations such as execution speed.
+ "low-power"
+};
+
+dictionary MLContextOptions {
+ // Preferred kind of device used
+ MLDevicePreference devicePreference = "default";
+
+ // Preference as related to power consumption
+ MLPowerPreference powerPreference = "default";
+};
+
+[SecureContext, Exposed=(Window, DedicatedWorker)]
+interface ML {
+ // Create a context with options
+ MLContext createContext(optional MLContextOptions options = {});
+
+ // Create a context from WebGL rendering context
+ MLContext createContext(WebGLRenderingContext glContext);
+
+ // Create a context from WebGPU device
+ MLContext createContext(GPUDevice gpuDevice);
+};
+
+[SecureContext, Exposed=(Window, DedicatedWorker)]
+interface MLContext {};
+
+enum MLInputOperandLayout {
+ "nchw",
+ "nhwc"
+};
+
+enum MLOperandType {
+ "float32",
+ "float16",
+ "int32",
+ "uint32",
+ "int8",
+ "uint8"
+};
+
+dictionary MLOperandDescriptor {
+ // The operand type.
+ required MLOperandType type;
+
+ // The dimensions field is only required for tensor operands.
+ // The negative value means an unknown dimension.
+ sequence<long> dimensions;
+};
+
+[SecureContext, Exposed=(Window, DedicatedWorker)]
+interface MLOperand {};
+
+[SecureContext, Exposed=(Window, DedicatedWorker)]
+interface MLOperator {};
+
+typedef record<DOMString, MLOperand> MLNamedOperands;
+
+dictionary MLBufferResourceView {
+ required (WebGLBuffer or GPUBuffer) resource;
+ unsigned long long offset = 0;
+ unsigned long long size;
+};
+
+typedef (ArrayBufferView or MLBufferResourceView) MLBufferView;
+
+[SecureContext, Exposed=(Window, DedicatedWorker)]
+interface MLGraphBuilder {
+ // Construct the graph builder from the context.
+ constructor(MLContext context);
+
+ // Create an operand for a graph input.
+ MLOperand input(DOMString name, MLOperandDescriptor desc);
+
+ // Create an operand for a graph constant.
+ MLOperand constant(MLOperandDescriptor desc, MLBufferView bufferView);
+
+ // Create a single-value operand from the specified number of the specified type.
+ MLOperand constant(double value, optional MLOperandType type = "float32");
+
+ // Compile the graph up to the specified output operands
+ MLGraph build(MLNamedOperands outputs);
+};
+
+dictionary MLBatchNormalizationOptions {
+ MLOperand scale;
+ MLOperand bias;
+ long axis = 1;
+ float epsilon = 1e-5;
+ MLOperator activation;
+};
+
+partial interface MLGraphBuilder {
+ MLOperand batchNormalization(MLOperand input, MLOperand mean, MLOperand variance,
+ optional MLBatchNormalizationOptions options = {});
+};
+
+dictionary MLClampOptions {
+ float minValue;
+ float maxValue;
+};
+
+partial interface MLGraphBuilder {
+ MLOperand clamp(MLOperand x, optional MLClampOptions options = {});
+ MLOperator clamp(optional MLClampOptions options = {});
+};
+
+partial interface MLGraphBuilder {
+ MLOperand concat(sequence<MLOperand> inputs, long axis);
+};
+
+enum MLFilterOperandLayout {
+ "oihw",
+ "hwio",
+ "ohwi",
+ "ihwo"
+};
+
+enum MLAutoPad {
+ "explicit",
+ "same-upper",
+ "same-lower"
+};
+
+dictionary MLConv2dOptions {
+ sequence<long> padding;
+ sequence<long> strides;
+ sequence<long> dilations;
+ sequence<long> outputPadding;
+ sequence<long> outputSizes;
+ MLAutoPad autoPad = "explicit";
+ boolean transpose = false;
+ long groups = 1;
+ MLInputOperandLayout inputLayout = "nchw";
+ MLFilterOperandLayout filterLayout = "oihw";
+ MLOperand bias;
+ MLOperator activation;
+};
+
+partial interface MLGraphBuilder {
+ MLOperand conv2d(MLOperand input, MLOperand filter, optional MLConv2dOptions options = {});
+};
+
+partial interface MLGraphBuilder {
+ MLOperand add(MLOperand a, MLOperand b);
+ MLOperand sub(MLOperand a, MLOperand b);
+ MLOperand mul(MLOperand a, MLOperand b);
+ MLOperand div(MLOperand a, MLOperand b);
+ MLOperand max(MLOperand a, MLOperand b);
+ MLOperand min(MLOperand a, MLOperand b);
+ MLOperand pow(MLOperand a, MLOperand b);
+};
+
+partial interface MLGraphBuilder {
+ MLOperand abs(MLOperand x);
+ MLOperand ceil(MLOperand x);
+ MLOperand cos(MLOperand x);
+ MLOperand exp(MLOperand x);
+ MLOperand floor(MLOperand x);
+ MLOperand log(MLOperand x);
+ MLOperand neg(MLOperand x);
+ MLOperand sin(MLOperand x);
+ MLOperand tan(MLOperand x);
+};
+
+dictionary MLEluOptions {
+ float alpha = 1;
+};
+
+partial interface MLGraphBuilder {
+ MLOperand elu(MLOperand x, optional MLEluOptions options = {});
+ MLOperator elu(optional MLEluOptions options = {});
+};
+
+dictionary MLGemmOptions {
+ MLOperand c;
+ float alpha = 1.0;
+ float beta = 1.0;
+ boolean aTranspose = false;
+ boolean bTranspose = false;
+};
+
+partial interface MLGraphBuilder {
+ MLOperand gemm(MLOperand a, MLOperand b, optional MLGemmOptions options = {});
+};
+
+enum MLRecurrentNetworkWeightLayout {
+ "zrn", // update-reset-new gate ordering
+ "rzn" // reset-update-new gate ordering
+};
+
+enum MLRecurrentNetworkDirection {
+ "forward",
+ "backward",
+ "both"
+};
+
+dictionary MLGruOptions {
+ MLOperand bias;
+ MLOperand recurrentBias;
+ MLOperand initialHiddenState;
+ boolean resetAfter = true;
+ boolean returnSequence = false;
+ MLRecurrentNetworkDirection direction = "forward";
+ MLRecurrentNetworkWeightLayout layout = "zrn";
+ sequence<MLOperator> activations;
+};
+
+partial interface MLGraphBuilder {
+ sequence<MLOperand> gru(MLOperand input, MLOperand weight, MLOperand recurrentWeight,
+
+ long steps, long hiddenSize, optional MLGruOptions options = {});
+};
+
+dictionary MLGruCellOptions {
+ MLOperand bias;
+ MLOperand recurrentBias;
+ boolean resetAfter = true;
+ MLRecurrentNetworkWeightLayout layout = "zrn";
+ sequence<MLOperator> activations;
+};
+
+partial interface MLGraphBuilder {
+ MLOperand gruCell(MLOperand input, MLOperand weight, MLOperand recurrentWeight,
+
+ MLOperand hiddenState, long hiddenSize, optional MLGruCellOptions options = {});
+};
+
+dictionary MLHardSigmoidOptions {
+ float alpha = 0.2;
+ float beta = 0.5;
+};
+
+partial interface MLGraphBuilder {
+ MLOperand hardSigmoid(MLOperand x, optional MLHardSigmoidOptions options = {});
+ MLOperator hardSigmoid(optional MLHardSigmoidOptions options = {});
+};
+
+partial interface MLGraphBuilder {
+ MLOperand hardSwish(MLOperand x);
+ MLOperator hardSwish();
+};
+
+dictionary MLInstanceNormalizationOptions {
+ MLOperand scale;
+ MLOperand bias;
+ float epsilon = 1e-5;
+ MLInputOperandLayout layout = "nchw";
+};
+
+partial interface MLGraphBuilder {
+ MLOperand instanceNormalization(MLOperand input,
+
+ optional MLInstanceNormalizationOptions options = {});
+};
+
+dictionary MLLeakyReluOptions {
+ float alpha = 0.01;
+};
+
+partial interface MLGraphBuilder {
+ MLOperand leakyRelu(MLOperand x, optional MLLeakyReluOptions options = {});
+ MLOperator leakyRelu(optional MLLeakyReluOptions options = {});
+};
+
+partial interface MLGraphBuilder {
+ MLOperand matmul(MLOperand a, MLOperand b);
+};
+
+dictionary MLLinearOptions {
+ float alpha = 1;
+ float beta = 0;
+};
+
+partial interface MLGraphBuilder {
+ MLOperand linear(MLOperand x, optional MLLinearOptions options = {});
+ MLOperator linear(optional MLLinearOptions options = {});
+};
+
+enum MLPaddingMode {
+ "constant",
+ "edge",
+ "reflection",
+ "symmetric"
+};
+
+dictionary MLPadOptions {
+ MLPaddingMode mode = "constant";
+ float value = 0;
+};
+
+partial interface MLGraphBuilder {
+ MLOperand pad(MLOperand input, MLOperand padding, optional MLPadOptions options = {});
+};
+
+dictionary MLPool2dOptions {
+ sequence<long> windowDimensions;
+ sequence<long> padding;
+ sequence<long> strides;
+ sequence<long> dilations;
+ MLAutoPad autoPad = "explicit";
+ MLInputOperandLayout layout = "nchw";
+};
+
+partial interface MLGraphBuilder {
+ MLOperand averagePool2d(MLOperand input, optional MLPool2dOptions options = {});
+ MLOperand l2Pool2d(MLOperand input, optional MLPool2dOptions options = {});
+ MLOperand maxPool2d(MLOperand input, optional MLPool2dOptions options = {});
+};
+
+dictionary MLReduceOptions {
+ sequence<long> axes = null;
+ boolean keepDimensions = false;
+};
+
+partial interface MLGraphBuilder {
+ MLOperand reduceL1(MLOperand input, optional MLReduceOptions options = {});
+ MLOperand reduceL2(MLOperand input, optional MLReduceOptions options = {});
+ MLOperand reduceLogSum(MLOperand input, optional MLReduceOptions options = {});
+ MLOperand reduceLogSumExp(MLOperand input, optional MLReduceOptions options = {});
+ MLOperand reduceMax(MLOperand input, optional MLReduceOptions options = {});
+ MLOperand reduceMean(MLOperand input, optional MLReduceOptions options = {});
+ MLOperand reduceMin(MLOperand input, optional MLReduceOptions options = {});
+ MLOperand reduceProduct(MLOperand input, optional MLReduceOptions options = {});
+ MLOperand reduceSum(MLOperand input, optional MLReduceOptions options = {});
+ MLOperand reduceSumSquare(MLOperand input, optional MLReduceOptions options = {});
+};
+
+partial interface MLGraphBuilder {
+ MLOperand relu(MLOperand x);
+ MLOperator relu();
+};
+
+enum MLInterpolationMode {
+ "nearest-neighbor",
+ "linear"
+};
+
+dictionary MLResampleOptions {
+ MLInterpolationMode mode = "nearest-neighbor";
+ sequence<float> scales;
+ sequence<long> sizes;
+};
+
+partial interface MLGraphBuilder {
+ MLOperand resample(MLOperand input, optional MLResampleOptions options = {});
+};
+
+partial interface MLGraphBuilder {
+ MLOperand reshape(MLOperand input, sequence<long> newShape);
+};
+
+partial interface MLGraphBuilder {
+ MLOperand sigmoid(MLOperand x);
+ MLOperator sigmoid();
+};
+
+dictionary MLSliceOptions {
+ sequence<long> axes;
+};
+
+partial interface MLGraphBuilder {
+ MLOperand slice(MLOperand input, sequence<long> starts, sequence<long> sizes,
+ optional MLSliceOptions options = {});
+};
+
+partial interface MLGraphBuilder {
+ MLOperand softmax(MLOperand x);
+};
+
+dictionary MLSoftplusOptions {
+ float steepness = 1;
+};
+
+partial interface MLGraphBuilder {
+ MLOperand softplus(MLOperand x, optional MLSoftplusOptions options = {});
+ MLOperator softplus(optional MLSoftplusOptions options = {});
+};
+
+partial interface MLGraphBuilder {
+ MLOperand softsign(MLOperand x);
+ MLOperator softsign();
+};
+
+dictionary MLSplitOptions {
+ long axis = 0;
+};
+
+partial interface MLGraphBuilder {
+ sequence<MLOperand> split(MLOperand input,
+ (unsigned long or sequence<unsigned long>) splits,
+ optional MLSplitOptions options = {});
+};
+
+dictionary MLSqueezeOptions {
+ sequence<long> axes;
+};
+
+partial interface MLGraphBuilder {
+ MLOperand squeeze(MLOperand input, optional MLSqueezeOptions options = {});
+};
+
+partial interface MLGraphBuilder {
+ MLOperand tanh(MLOperand x);
+ MLOperator tanh();
+};
+
+dictionary MLTransposeOptions {
+ sequence<long> permutation;
+};
+
+partial interface MLGraphBuilder {
+ MLOperand transpose(MLOperand input, optional MLTransposeOptions options = {});
+};
+
+typedef (MLBufferView or WebGLTexture or GPUTexture) MLResource;
+
+dictionary MLInput {
+ required MLResource resource;
+ required sequence<long> dimensions;
+};
+
+typedef record<DOMString, (MLResource or MLInput)> MLNamedInputs;
+typedef record<DOMString, MLResource> MLNamedOutputs;
+
+[SecureContext, Exposed=(Window, DedicatedWorker)]
+interface MLGraph {
+ undefined compute(MLNamedInputs inputs, MLNamedOutputs outputs);
+};
diff --git a/interfaces/webrtc-encoded-transform.idl b/interfaces/webrtc-encoded-transform.idl
index 2ceb935..0026232 100644
--- a/interfaces/webrtc-encoded-transform.idl
+++ b/interfaces/webrtc-encoded-transform.idl
@@ -36,9 +36,31 @@
interface SFrameTransform {
constructor(optional SFrameTransformOptions options = {});
Promise<undefined> setEncryptionKey(CryptoKey key, optional CryptoKeyID keyID);
+ attribute EventHandler onerror;
};
SFrameTransform includes GenericTransformStream;
+enum SFrameTransformErrorEventType {
+ "authentication",
+ "keyID",
+ "syntax"
+};
+
+[Exposed=(Window,DedicatedWorker)]
+interface SFrameTransformErrorEvent : Event {
+ constructor(DOMString type, SFrameTransformErrorEventInit eventInitDict);
+
+ readonly attribute SFrameTransformErrorEventType errorType;
+ readonly attribute CryptoKeyID? keyID;
+ readonly attribute any frame;
+};
+
+dictionary SFrameTransformErrorEventInit : EventInit {
+ required SFrameTransformErrorEventType errorType;
+ required any frame;
+ CryptoKeyID? keyID;
+};
+
// New enum for video frame types. Will eventually re-use the equivalent defined
// by WebCodecs.
enum RTCEncodedVideoFrameType {
diff --git a/interfaces/webrtc-identity.idl b/interfaces/webrtc-identity.idl
index d7a40b0..3b8e264 100644
--- a/interfaces/webrtc-identity.idl
+++ b/interfaces/webrtc-identity.idl
@@ -3,15 +3,14 @@
// (https://github.com/w3c/webref)
// Source: Identity for WebRTC 1.0 (https://w3c.github.io/webrtc-identity/)
-[Global,
- Exposed=RTCIdentityProviderGlobalScope]
+[Global, Exposed=RTCIdentityProviderGlobalScope]
interface RTCIdentityProviderGlobalScope : WorkerGlobalScope {
- readonly attribute RTCIdentityProviderRegistrar rtcIdentityProvider;
+ readonly attribute RTCIdentityProviderRegistrar rtcIdentityProvider;
};
[Exposed=RTCIdentityProviderGlobalScope]
interface RTCIdentityProviderRegistrar {
- undefined register(RTCIdentityProvider idp);
+ undefined register (RTCIdentityProvider idp);
};
dictionary RTCIdentityProvider {
@@ -19,12 +18,11 @@
required ValidateAssertionCallback validateAssertion;
};
-callback GenerateAssertionCallback = Promise<RTCIdentityAssertionResult> (DOMString contents,
-DOMString origin,
-RTCIdentityProviderOptions options);
+callback GenerateAssertionCallback = Promise<RTCIdentityAssertionResult>
+(DOMString contents, DOMString origin, RTCIdentityProviderOptions options);
-callback ValidateAssertionCallback = Promise<RTCIdentityValidationResult> (DOMString assertion,
-DOMString origin);
+callback ValidateAssertionCallback = Promise<RTCIdentityValidationResult>
+(DOMString assertion, DOMString origin);
dictionary RTCIdentityAssertionResult {
required RTCIdentityProviderDetails idp;
@@ -50,7 +48,7 @@
};
partial dictionary RTCConfiguration {
- DOMString peerIdentity;
+ DOMString peerIdentity;
};
dictionary RTCIdentityProviderOptions {
diff --git a/interfaces/webtransport.idl b/interfaces/webtransport.idl
index 4862bef..ce9abde 100644
--- a/interfaces/webtransport.idl
+++ b/interfaces/webtransport.idl
@@ -3,57 +3,46 @@
// (https://github.com/w3c/webref)
// Source: WebTransport (https://w3c.github.io/webtransport/)
-interface mixin UnidirectionalStreamsTransport {
- Promise<SendStream> createUnidirectionalStream(optional SendStreamParameters parameters = {});
- /* a ReadableStream of ReceiveStream objects */
- readonly attribute ReadableStream incomingUnidirectionalStreams;
-};
-
-dictionary SendStreamParameters {
-};
-
-[Exposed=(Window,Worker)]
-interface DatagramDuplexStream {
+[Exposed=(Window,Worker), SecureContext]
+interface WebTransportDatagramDuplexStream {
readonly attribute ReadableStream readable;
readonly attribute WritableStream writable;
+
+ readonly attribute unsigned long maxDatagramSize;
+ attribute double? incomingMaxAge;
+ attribute double? outgoingMaxAge;
+ attribute long incomingHighWaterMark;
+ attribute long outgoingHighWaterMark;
};
-[Exposed=(Window,Worker)]
+[Exposed=(Window,Worker), SecureContext]
interface WebTransport {
constructor(USVString url, optional WebTransportOptions options = {});
Promise<WebTransportStats> getStats();
- readonly attribute WebTransportState state;
readonly attribute Promise<undefined> ready;
readonly attribute Promise<WebTransportCloseInfo> closed;
undefined close(optional WebTransportCloseInfo closeInfo = {});
- attribute EventHandler onstatechange;
- readonly attribute unsigned short maxDatagramSize;
- readonly attribute DatagramDuplexStream datagrams;
+ readonly attribute WebTransportDatagramDuplexStream datagrams;
- Promise<BidirectionalStream> createBidirectionalStream();
- /* a ReadableStream of BidirectionalStream objects */
+ Promise<WebTransportBidirectionalStream> createBidirectionalStream();
+ /* a ReadableStream of WebTransportBidirectionalStream objects */
readonly attribute ReadableStream incomingBidirectionalStreams;
-};
-WebTransport includes UnidirectionalStreamsTransport;
+ Promise<WritableStream> createUnidirectionalStream();
+ /* a ReadableStream of ReceiveStreams */
+ readonly attribute ReadableStream incomingUnidirectionalStreams;
+};
dictionary WebTransportOptions {
boolean allowPooling;
sequence<RTCDtlsFingerprint> serverCertificateFingerprints;
};
-enum WebTransportState {
- "connecting",
- "connected",
- "closed",
- "failed"
-};
-
dictionary WebTransportCloseInfo {
- unsigned long long errorCode = 0;
- DOMString reason = "";
+ unsigned long errorCode;
+ DOMString reason;
};
dictionary WebTransportStats {
@@ -68,23 +57,26 @@
unsigned long numReceivedDatagramsDropped;
};
-[ Exposed=(Window,Worker) ]
-interface SendStream : WritableStream /* of Uint8Array */ {
- readonly attribute Promise<StreamAbortInfo> remoteCanceled;
- undefined reset(optional StreamAbortInfo abortInfo = {});
+[Exposed=(Window,Worker), SecureContext]
+interface WebTransportBidirectionalStream {
+ readonly attribute ReadableStream readable;
+ readonly attribute WritableStream writable;
};
-dictionary StreamAbortInfo {
- [EnforceRange] octet errorCode = 0;
+[Exposed=(Window,Worker), SecureContext]
+interface WebTransportError : DOMException {
+ constructor(optional WebTransportErrorInit init = {});
+
+ readonly attribute WebTransportErrorSource source;
+ readonly attribute octet? streamErrorCode;
};
-[ Exposed=(Window,Worker) ]
-interface ReceiveStream : ReadableStream /* of Uint8Array */ {
- readonly attribute Promise<StreamAbortInfo> remoteReset;
+dictionary WebTransportErrorInit {
+ [Clamp] octet streamErrorCode;
+ DOMString message;
};
-[ Exposed=(Window,Worker) ]
-interface BidirectionalStream {
- readonly attribute ReceiveStream readable;
- readonly attribute SendStream writable;
+enum WebTransportErrorSource {
+ "stream",
+ "session",
};
diff --git a/interfaces/depth-sensing.idl b/interfaces/webxr-depth-sensing.idl
similarity index 100%
rename from interfaces/depth-sensing.idl
rename to interfaces/webxr-depth-sensing.idl
diff --git a/interfaces/webxr-hand-input.idl b/interfaces/webxr-hand-input.idl
index e89210c..9a11277 100644
--- a/interfaces/webxr-hand-input.idl
+++ b/interfaces/webxr-hand-input.idl
@@ -4,7 +4,7 @@
// Source: WebXR Hand Input Module - Level 1 (https://immersive-web.github.io/webxr-hand-input/)
partial interface XRInputSource {
- readonly attribute XRHand? hand;
+ [SameObject] readonly attribute XRHand? hand;
};
enum XRHandJoint {
diff --git a/interfaces/webxr.idl b/interfaces/webxr.idl
index 3e5b432..14eaebb 100644
--- a/interfaces/webxr.idl
+++ b/interfaces/webxr.idl
@@ -36,11 +36,14 @@
[SecureContext, Exposed=Window] interface XRSession : EventTarget {
// Attributes
readonly attribute XRVisibilityState visibilityState;
+ readonly attribute float? frameRate;
+ readonly attribute Float32Array? supportedFrameRates;
[SameObject] readonly attribute XRRenderState renderState;
[SameObject] readonly attribute XRInputSourceArray inputSources;
// Methods
undefined updateRenderState(optional XRRenderStateInit state = {});
+ Promise<undefined> updateTargetFrameRate(float rate);
[NewObject] Promise<XRReferenceSpace> requestReferenceSpace(XRReferenceSpaceType type);
unsigned long requestAnimationFrame(XRFrameRequestCallback callback);
@@ -58,6 +61,7 @@
attribute EventHandler onsqueezestart;
attribute EventHandler onsqueezeend;
attribute EventHandler onvisibilitychange;
+ attribute EventHandler onframeratechange;
};
dictionary XRRenderStateInit {