Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync interfaces/ with @webref/idl 2.2.9 #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 9 additions & 12 deletions interfaces/CSP.idl
Original file line number Diff line number Diff line change
Expand Up @@ -25,34 +25,31 @@ enum SecurityPolicyViolationEventDisposition {
[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;
readonly attribute USVString sourceFile;
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;
};
1 change: 1 addition & 0 deletions interfaces/WebIDL.idl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
21 changes: 0 additions & 21 deletions interfaces/construct-stylesheets.idl

This file was deleted.

8 changes: 4 additions & 4 deletions interfaces/css-typed-om.idl
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,10 @@ interface CSSMathMax : CSSMathValue {

[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)]
Expand Down
12 changes: 12 additions & 0 deletions interfaces/cssom.idl
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,21 @@ interface StyleSheet {

[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 {
Expand All @@ -53,6 +64,7 @@ interface StyleSheetList {

partial interface mixin DocumentOrShadowRoot {
[SameObject] readonly attribute StyleSheetList styleSheets;
attribute ObservableArray<CSSStyleSheet> adoptedStyleSheets;
};

interface mixin LinkStyle {
Expand Down
9 changes: 3 additions & 6 deletions interfaces/device-posture.idl
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ interface DevicePosture : EventTarget {
};

enum DevicePostureType {
"no-fold",
"laptop",
"flat",
"tent",
"tablet",
"book"
"continuous",
"folded",
"folded-over"
};
20 changes: 14 additions & 6 deletions interfaces/encrypted-media.idl
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,21 @@ enum MediaKeySessionType {
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);
Expand Down
16 changes: 16 additions & 0 deletions interfaces/file-system-access.idl
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,17 @@ interface FileSystemWritableFileStream : WritableStream {
Promise<undefined> truncate(unsigned long long size);
};

enum WellKnownDirectory {
"desktop",
"documents",
"downloads",
"music",
"pictures",
"videos",
};

typedef (WellKnownDirectory or FileSystemHandle) StartInDirectory;

dictionary FilePickerAcceptType {
USVString description;
record<USVString, (USVString or sequence<USVString>)> accept;
Expand All @@ -97,16 +108,21 @@ dictionary FilePickerAcceptType {
dictionary FilePickerOptions {
sequence<FilePickerAcceptType> types;
boolean excludeAcceptAllOption = false;
DOMString id;
StartInDirectory startIn;
};

dictionary OpenFilePickerOptions : FilePickerOptions {
boolean multiple = false;
};

dictionary SaveFilePickerOptions : FilePickerOptions {
USVString? suggestedName;
};

dictionary DirectoryPickerOptions {
DOMString id;
StartInDirectory startIn;
};

[SecureContext]
Expand Down
96 changes: 52 additions & 44 deletions interfaces/html.idl
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ interface HTMLMetaElement : HTMLElement {
[CEReactions] attribute DOMString name;
[CEReactions] attribute DOMString httpEquiv;
[CEReactions] attribute DOMString content;
[CEReactions] attribute DOMString media;

// also has obsolete members
};
Expand Down Expand Up @@ -972,7 +973,7 @@ interface HTMLSelectElement : HTMLElement {

[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
Expand Down Expand Up @@ -1239,7 +1240,7 @@ dictionary AssignedNodesOptions {
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 {
Expand Down Expand Up @@ -1274,6 +1275,7 @@ dictionary CanvasRenderingContext2DSettings {
boolean alpha = true;
boolean desynchronized = false;
PredefinedColorSpace colorSpace = "srgb";
boolean willReadFrequently = false;
};

enum ImageSmoothingQuality { "low", "medium", "high" };
Expand Down Expand Up @@ -1446,7 +1448,7 @@ interface mixin CanvasTextDrawingStyles {
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 {
Expand All @@ -1458,6 +1460,7 @@ interface mixin CanvasPath {
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);
};
Expand Down Expand Up @@ -1527,14 +1530,14 @@ dictionary ImageBitmapRenderingContextSettings {
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 {
Expand Down Expand Up @@ -1724,6 +1727,7 @@ interface Window : EventTarget {

// the user agent
readonly attribute Navigator navigator;
readonly attribute Navigator clientInformation; // legacy alias of .navigator
readonly attribute boolean originAgentCluster;

// user prompts
Expand Down Expand Up @@ -2050,6 +2054,49 @@ interface mixin NavigatorCookies {
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;
Expand Down Expand Up @@ -2656,42 +2703,3 @@ interface External {
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;
};
8 changes: 2 additions & 6 deletions interfaces/js-self-profiling.idl
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
// (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;

constructor(ProfilerInitOptions options);
Promise<ProfilerTrace> stop();
};

Expand Down Expand Up @@ -41,8 +42,3 @@ dictionary ProfilerInitOptions {
required DOMHighResTimeStamp sampleInterval;
required unsigned long maxBufferSize;
};

[Exposed=(Window,Worker)]
partial interface Performance {
Promise<Profiler> profile(ProfilerInitOptions options);
};
Loading