Update web-platform-tests to revision 8a2ceb5f18911302b7a5c1cd2791f4ab50ad4326

This commit is contained in:
Josh Matthews 2017-10-12 09:25:50 -04:00
parent 462c272380
commit 1f531f66ea
5377 changed files with 174916 additions and 84369 deletions

View file

@ -0,0 +1,13 @@
[SecureContext]
interface Clipboard : EventTarget {
Promise<DataTransfer> read();
Promise<DOMString> readText();
Promise<void> write(DataTransfer data);
Promise<void> writeText(DOMString data);
};
[SecureContext]
partial interface Navigator {
[SameObject] readonly attribute Clipboard clipboard;
};

View file

@ -0,0 +1,22 @@
[Exposed=(Window,Worker,Worklet)]
namespace console {
void assert(optional boolean condition = false, any... data);
void clear();
void count(optional DOMString label = "default");
void debug(any... data);
void error(any... data);
void info(any... data);
void log(any... data);
void table(any tabularData, optional sequence<DOMString> properties);
void trace(any... data);
void warn(any... data);
void dir(any item, optional object? options);
void dirxml(any... data);
void group(any... data);
void groupCollapsed(any... data);
void groupEnd();
void time(optional DOMString label = "default");
void timeEnd(optional DOMString label = "default");
};

View file

@ -0,0 +1,184 @@
enum ScrollBehavior { "auto", "instant", "smooth" };
dictionary ScrollOptions {
ScrollBehavior behavior = "auto";
};
dictionary ScrollToOptions : ScrollOptions {
unrestricted double left;
unrestricted double top;
};
partial interface Window {
[NewObject] MediaQueryList matchMedia(CSSOMString query);
[SameObject, Replaceable] readonly attribute Screen screen;
// browsing context
void moveTo(long x, long y);
void moveBy(long x, long y);
void resizeTo(long x, long y);
void resizeBy(long x, long y);
// viewport
[Replaceable] readonly attribute long innerWidth;
[Replaceable] readonly attribute long innerHeight;
// viewport scrolling
[Replaceable] readonly attribute double scrollX;
[Replaceable] readonly attribute double pageXOffset;
[Replaceable] readonly attribute double scrollY;
[Replaceable] readonly attribute double pageYOffset;
void scroll(optional ScrollToOptions options);
void scroll(unrestricted double x, unrestricted double y);
void scrollTo(optional ScrollToOptions options);
void scrollTo(unrestricted double x, unrestricted double y);
void scrollBy(optional ScrollToOptions options);
void scrollBy(unrestricted double x, unrestricted double y);
// client
[Replaceable] readonly attribute long screenX;
[Replaceable] readonly attribute long screenY;
[Replaceable] readonly attribute long outerWidth;
[Replaceable] readonly attribute long outerHeight;
[Replaceable] readonly attribute double devicePixelRatio;
};
[Exposed=Window]
interface MediaQueryList : EventTarget {
readonly attribute CSSOMString media;
readonly attribute boolean matches;
void addListener(EventListener? listener);
void removeListener(EventListener? listener);
attribute EventHandler onchange;
};
[Exposed=Window,
Constructor(CSSOMString type, optional MediaQueryListEventInit eventInitDict)]
interface MediaQueryListEvent : Event {
readonly attribute CSSOMString media;
readonly attribute boolean matches;
};
dictionary MediaQueryListEventInit : EventInit {
CSSOMString media = "";
boolean matches = false;
};
[Exposed=Window]
interface Screen {
readonly attribute long availWidth;
readonly attribute long availHeight;
readonly attribute long width;
readonly attribute long height;
readonly attribute unsigned long colorDepth;
readonly attribute unsigned long pixelDepth;
};
partial interface Document {
Element? elementFromPoint(double x, double y);
sequence<Element> elementsFromPoint(double x, double y);
CaretPosition? caretPositionFromPoint(double x, double y);
readonly attribute Element? scrollingElement;
};
[Exposed=Window]
interface CaretPosition {
readonly attribute Node offsetNode;
readonly attribute unsigned long offset;
[NewObject] DOMRect? getClientRect();
};
enum ScrollLogicalPosition { "start", "center", "end", "nearest" };
dictionary ScrollIntoViewOptions : ScrollOptions {
ScrollLogicalPosition block = "center";
ScrollLogicalPosition inline = "center";
};
partial interface Element {
DOMRectList getClientRects();
[NewObject] DOMRect getBoundingClientRect();
void scrollIntoView();
void scrollIntoView((boolean or object) arg);
void scroll(optional ScrollToOptions options);
void scroll(unrestricted double x, unrestricted double y);
void scrollTo(optional ScrollToOptions options);
void scrollTo(unrestricted double x, unrestricted double y);
void scrollBy(optional ScrollToOptions options);
void scrollBy(unrestricted double x, unrestricted double y);
attribute unrestricted double scrollTop;
attribute unrestricted double scrollLeft;
readonly attribute long scrollWidth;
readonly attribute long scrollHeight;
readonly attribute long clientTop;
readonly attribute long clientLeft;
readonly attribute long clientWidth;
readonly attribute long clientHeight;
};
partial interface HTMLElement {
readonly attribute Element? offsetParent;
readonly attribute long offsetTop;
readonly attribute long offsetLeft;
readonly attribute long offsetWidth;
readonly attribute long offsetHeight;
};
partial interface HTMLImageElement {
readonly attribute long x;
readonly attribute long y;
};
partial interface Range {
DOMRectList getClientRects();
[NewObject] DOMRect getBoundingClientRect();
};
/* TODO This is commented out because: "Partial interface MouseEvent with no original interface"
partial interface MouseEvent {
readonly attribute double screenX;
readonly attribute double screenY;
readonly attribute double pageX;
readonly attribute double pageY;
readonly attribute double clientX;
readonly attribute double clientY;
readonly attribute double x;
readonly attribute double y;
readonly attribute double offsetX;
readonly attribute double offsetY;
};
partial dictionary MouseEventInit {
double screenX = 0.0;
double screenY = 0.0;
double clientX = 0.0;
double clientY = 0.0;
};
*/
enum CSSBoxType { "margin", "border", "padding", "content" };
dictionary BoxQuadOptions {
CSSBoxType box = "border";
GeometryNode relativeTo; // XXX default document (i.e. viewport)
};
dictionary ConvertCoordinateOptions {
CSSBoxType fromBox = "border";
CSSBoxType toBox = "border";
};
[Exposed=Window,
NoInterfaceObject]
interface GeometryUtils {
sequence<DOMQuad> getBoxQuads(optional BoxQuadOptions options);
DOMQuad convertQuadFromNode(DOMQuadInit quad, GeometryNode from, optional ConvertCoordinateOptions options);
DOMQuad convertRectFromNode(DOMRectReadOnly rect, GeometryNode from, optional ConvertCoordinateOptions options);
DOMPoint convertPointFromNode(DOMPointInit point, GeometryNode from, optional ConvertCoordinateOptions options); // XXX z,w turns into 0
};
Text implements GeometryUtils; // like Range
Element implements GeometryUtils;
/* TODO Commented out because: "CSSPseudoElement implements GeometryUtils, but CSSPseudoElement is undefined."
CSSPseudoElement implements GeometryUtils;
*/
Document implements GeometryUtils;
typedef (Text or Element or CSSPseudoElement or Document) GeometryNode;

View file

@ -1,294 +1,143 @@
typedef USVString CSSOMString;
[Exposed=Window,
LegacyArrayClass]
interface MediaList {
stringifier attribute DOMString mediaText;
stringifier attribute [TreatNullAs=EmptyString] CSSOMString mediaText;
readonly attribute unsigned long length;
getter DOMString item(unsigned long index);
void appendMedium(DOMString medium);
void deleteMedium(DOMString medium);
getter CSSOMString? item(unsigned long index);
void appendMedium(CSSOMString medium);
void deleteMedium(CSSOMString medium);
};
[Exposed=Window]
interface StyleSheet {
readonly attribute DOMString type;
readonly attribute DOMString href;
readonly attribute Node ownerNode;
readonly attribute StyleSheet parentStyleSheet;
readonly attribute DOMString title;
[PutForwards=mediaText] readonly attribute MediaList media;
attribute boolean disabled;
readonly attribute CSSOMString type;
readonly attribute USVString? href;
readonly attribute (Element or ProcessingInstruction)? ownerNode;
readonly attribute StyleSheet? parentStyleSheet;
readonly attribute DOMString? title;
[SameObject, PutForwards=mediaText] readonly attribute MediaList media;
attribute boolean disabled;
};
[Exposed=Window]
interface CSSStyleSheet : StyleSheet {
readonly attribute CSSRule ownerRule;
readonly attribute CSSRuleList cssRules;
unsigned long insertRule(DOMString rule, unsigned long index);
readonly attribute CSSRule? ownerRule;
[SameObject] readonly attribute CSSRuleList cssRules;
unsigned long insertRule(CSSOMString rule, optional unsigned long index = 0);
void deleteRule(unsigned long index);
};
typedef sequence<StyleSheet> StyleSheetList;
[Exposed=Window,
LegacyArrayClass]
interface StyleSheetList {
getter StyleSheet? item(unsigned long index);
readonly attribute unsigned long length;
};
partial interface Document {
[SameObject] readonly attribute StyleSheetList styleSheets;
};
[NoInterfaceObject] interface LinkStyle {
readonly attribute StyleSheet sheet;
[Exposed=Window,
NoInterfaceObject]
interface LinkStyle {
readonly attribute StyleSheet? sheet;
};
ProcessingInstruction implements LinkStyle;
[Exposed=Window,
LegacyArrayClass]
interface CSSRuleList {
getter CSSRule? item(unsigned long index);
readonly attribute unsigned long length;
};
typedef sequence<CSSRule> CSSRuleList;
[Exposed=Window]
interface CSSRule {
// Types
const unsigned short STYLE_RULE = 1;
const unsigned short CHARSET_RULE = 2; // historical
const unsigned short IMPORT_RULE = 3;
const unsigned short MEDIA_RULE = 4;
const unsigned short FONT_FACE_RULE = 5;
const unsigned short PAGE_RULE = 6;
const unsigned short MARGIN_RULE = 9;
const unsigned short NAMESPACE_RULE = 10;
readonly attribute unsigned short type;
// Parsing and serialization
attribute DOMString cssText;
// Context
readonly attribute CSSRule parentRule;
readonly attribute CSSStyleSheet parentStyleSheet;
attribute CSSOMString cssText;
readonly attribute CSSRule? parentRule;
readonly attribute CSSStyleSheet? parentStyleSheet;
};
[Exposed=Window]
interface CSSStyleRule : CSSRule {
attribute DOMString selectorText;
readonly attribute CSSStyleDeclaration style;
attribute CSSOMString selectorText;
[SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
};
[Exposed=Window]
interface CSSImportRule : CSSRule {
readonly attribute DOMString href;
[PutForwards=mediaText] readonly attribute MediaList media;
readonly attribute CSSStyleSheet styleSheet;
readonly attribute USVString href;
[SameObject, PutForwards=mediaText] readonly attribute MediaList media;
[SameObject] readonly attribute CSSStyleSheet styleSheet;
};
interface CSSMediaRule : CSSRule {
[PutForwards=mediaText] readonly attribute MediaList media;
readonly attribute CSSRuleList cssRules;
unsigned long insertRule(DOMString rule, unsigned long index);
[Exposed=Window]
interface CSSGroupingRule : CSSRule {
[SameObject] readonly attribute CSSRuleList cssRules;
unsigned long insertRule(CSSOMString rule, optional unsigned long index = 0);
void deleteRule(unsigned long index);
};
interface CSSFontFaceRule : CSSRule {
readonly attribute CSSStyleDeclaration style;
[Exposed=Window]
interface CSSPageRule : CSSGroupingRule {
attribute CSSOMString selectorText;
[SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
};
interface CSSPageRule : CSSRule {
attribute DOMString selectorText;
readonly attribute CSSStyleDeclaration style;
[Exposed=Window]
interface CSSMarginRule : CSSRule {
readonly attribute CSSOMString name;
[SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
};
[Exposed=Window]
interface CSSNamespaceRule : CSSRule {
readonly attribute DOMString namespaceURI;
readonly attribute DOMString? prefix;
readonly attribute CSSOMString namespaceURI;
readonly attribute CSSOMString prefix;
};
[Exposed=Window]
interface CSSStyleDeclaration {
attribute DOMString cssText;
[CEReactions] attribute CSSOMString cssText;
readonly attribute unsigned long length;
DOMString item(unsigned long index);
DOMString getPropertyValue(DOMString property);
DOMString getPropertyPriority(DOMString property);
void setProperty(DOMString property, DOMString value, optional DOMString priority);
DOMString removeProperty(DOMString property);
readonly attribute CSSStyleDeclarationValue values;
readonly attribute CSSRule parentRule;
// CSS Properties
attribute DOMString azimuth;
attribute DOMString background;
attribute DOMString backgroundAttachment;
attribute DOMString backgroundColor;
attribute DOMString backgroundImage;
attribute DOMString backgroundPosition;
attribute DOMString backgroundRepeat;
attribute DOMString border;
attribute DOMString borderCollapse;
attribute DOMString borderColor;
attribute DOMString borderSpacing;
attribute DOMString borderStyle;
attribute DOMString borderTop;
attribute DOMString borderRight;
attribute DOMString borderBottom;
attribute DOMString borderLeft;
attribute DOMString borderTopColor;
attribute DOMString borderRightColor;
attribute DOMString borderBottomColor;
attribute DOMString borderLeftColor;
attribute DOMString borderTopStyle;
attribute DOMString borderRightStyle;
attribute DOMString borderBottomStyle;
attribute DOMString borderLeftStyle;
attribute DOMString borderTopWidth;
attribute DOMString borderRightWidth;
attribute DOMString borderBottomWidth;
attribute DOMString borderLeftWidth;
attribute DOMString borderWidth;
attribute DOMString bottom;
attribute DOMString captionSide;
attribute DOMString clear;
attribute DOMString clip;
attribute DOMString color;
attribute DOMString content;
attribute DOMString counterIncrement;
attribute DOMString counterReset;
attribute DOMString cue;
attribute DOMString cueAfter;
attribute DOMString cueBefore;
attribute DOMString cursor;
attribute DOMString direction;
attribute DOMString display;
attribute DOMString elevation;
attribute DOMString emptyCells;
attribute DOMString cssFloat;
attribute DOMString font;
attribute DOMString fontFamily;
attribute DOMString fontSize;
attribute DOMString fontSizeAdjust;
attribute DOMString fontStretch;
attribute DOMString fontStyle;
attribute DOMString fontVariant;
attribute DOMString fontWeight;
attribute DOMString height;
attribute DOMString left;
attribute DOMString letterSpacing;
attribute DOMString lineHeight;
attribute DOMString listStyle;
attribute DOMString listStyleImage;
attribute DOMString listStylePosition;
attribute DOMString listStyleType;
attribute DOMString margin;
attribute DOMString marginTop;
attribute DOMString marginRight;
attribute DOMString marginBottom;
attribute DOMString marginLeft;
attribute DOMString marks;
attribute DOMString maxHeight;
attribute DOMString maxWidth;
attribute DOMString minHeight;
attribute DOMString minWidth;
attribute DOMString orphans;
attribute DOMString outline;
attribute DOMString outlineColor;
attribute DOMString outlineStyle;
attribute DOMString outlineWidth;
attribute DOMString overflow;
attribute DOMString padding;
attribute DOMString paddingTop;
attribute DOMString paddingRight;
attribute DOMString paddingBottom;
attribute DOMString paddingLeft;
attribute DOMString page;
attribute DOMString pageBreakAfter;
attribute DOMString pageBreakBefore;
attribute DOMString pageBreakInside;
attribute DOMString pause;
attribute DOMString pauseAfter;
attribute DOMString pauseBefore;
attribute DOMString pitch;
attribute DOMString pitchRange;
attribute DOMString playDuring;
attribute DOMString position;
attribute DOMString quotes;
attribute DOMString richness;
attribute DOMString right;
attribute DOMString size;
attribute DOMString speak;
attribute DOMString speakHeader;
attribute DOMString speakNumeral;
attribute DOMString speakPunctuation;
attribute DOMString speechRate;
attribute DOMString stress;
attribute DOMString tableLayout;
attribute DOMString textAlign;
attribute DOMString textDecoration;
attribute DOMString textIndent;
attribute DOMString textShadow;
attribute DOMString textTransform;
attribute DOMString top;
attribute DOMString unicodeBidi;
attribute DOMString verticalAlign;
attribute DOMString visibility;
attribute DOMString voiceFamily;
attribute DOMString volume;
attribute DOMString whiteSpace;
attribute DOMString widows;
attribute DOMString width;
attribute DOMString wordSpacing;
attribute DOMString zIndex;
getter CSSOMString item(unsigned long index);
CSSOMString getPropertyValue(CSSOMString property);
CSSOMString getPropertyPriority(CSSOMString property);
[CEReactions] void setProperty(CSSOMString property, [TreatNullAs=EmptyString] CSSOMString value, [TreatNullAs=EmptyString] optional CSSOMString priority = "");
[CEReactions] void setPropertyValue(CSSOMString property, [TreatNullAs=EmptyString] CSSOMString value);
[CEReactions] void setPropertyPriority(CSSOMString property, [TreatNullAs=EmptyString] CSSOMString priority);
[CEReactions] CSSOMString removeProperty(CSSOMString property);
readonly attribute CSSRule? parentRule;
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString cssFloat;
};
interface CSSStyleDeclarationValue {
// ...
// CSS Properties
[Exposed=Window,
NoInterfaceObject]
interface ElementCSSInlineStyle {
[SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
};
interface CSSPropertyValue {
attribute DOMString cssText;
HTMLElement implements ElementCSSInlineStyle;
SVGElement implements ElementCSSInlineStyle;
partial interface Window {
[NewObject] CSSStyleDeclaration getComputedStyle(Element elt, optional CSSOMString? pseudoElt);
};
[NoInterfaceObject] interface CSSMapValue {
getter CSSValue (DOMString name);
[Exposed=Window]
interface CSS {
static CSSOMString escape(CSSOMString ident);
};
[NoInterfaceObject] interface CSSPropertyValueList {
readonly attribute CSSValue[] list;
};
[NoInterfaceObject] interface CSSComponentValue {
readonly attribute DOMString type;
attribute any value;
};
[NoInterfaceObject] interface CSSStringComponentValue {
attribute DOMString string;
};
[NoInterfaceObject] interface CSSKeywordComponentValue {
attribute DOMString keyword;
};
[NoInterfaceObject] interface CSSIdentifierComponentValue {
attribute DOMString identifier;
};
[NoInterfaceObject] interface CSSColorComponentValue {
attribute short red;
attribute short green;
attribute short blue;
attribute float alpha;
};
[NoInterfaceObject] interface CSSLengthComponentValue {
attribute float em;
attribute float ex;
attribute float px;
// figure out what to do with absolute lengths
};
[NoInterfaceObject] interface CSSPercentageComponentValue {
attribute float percent;
};
[NoInterfaceObject] interface CSSURLComponentValue {
attribute DOMString? url;
};
[NoInterfaceObject] interface ElementCSSInlineStyle {
readonly attribute CSSStyleDeclaration style;
};
//partial interface Window {
// CSSStyleDeclaration getComputedStyle(Element elt);
// CSSStyleDeclaration getComputedStyle(Element elt, DOMString pseudoElt);
//};

View file

@ -0,0 +1,133 @@
// -----------------------------------------------------------------------------
// DOM
// -----------------------------------------------------------------------------
[Exposed=(Window,Worker)]
interface EventTarget {
void addEventListener(DOMString type, EventListener? callback, optional (AddEventListenerOptions or boolean) options);
void removeEventListener(DOMString type, EventListener? callback, optional (EventListenerOptions or boolean) options);
boolean dispatchEvent(Event event);
};
callback interface EventListener {
void handleEvent(Event event);
};
dictionary EventListenerOptions {
boolean capture = false;
};
dictionary AddEventListenerOptions : EventListenerOptions {
boolean passive = false;
boolean once = false;
};
// -----------------------------------------------------------------------------
// HTML
// -----------------------------------------------------------------------------
[TreatNonCallableAsNull]
callback EventHandlerNonNull = any (Event event);
typedef EventHandlerNonNull? EventHandler;
[TreatNonCallableAsNull]
callback OnErrorEventHandlerNonNull = any ((Event or DOMString) event, optional DOMString source, optional unsigned long lineno, optional unsigned long column, optional any error);
typedef OnErrorEventHandlerNonNull? OnErrorEventHandler;
[Exposed=Worker]
interface WorkerGlobalScope : EventTarget {
readonly attribute WorkerGlobalScope self;
readonly attribute WorkerLocation location;
readonly attribute WorkerNavigator navigator;
void importScripts(USVString... urls);
attribute OnErrorEventHandler onerror;
attribute EventHandler onlanguagechange;
attribute EventHandler onoffline;
attribute EventHandler ononline;
attribute EventHandler onrejectionhandled;
attribute EventHandler onunhandledrejection;
};
[Global=(Worker,DedicatedWorker),Exposed=DedicatedWorker]
interface DedicatedWorkerGlobalScope : WorkerGlobalScope {
[Replaceable] readonly attribute DOMString name;
void postMessage(any message, optional sequence<object> transfer = []);
void close();
attribute EventHandler onmessage;
attribute EventHandler onmessageerror;
};
typedef (DOMString or Function) TimerHandler;
[NoInterfaceObject, Exposed=(Window,Worker)]
interface WindowOrWorkerGlobalScope {
[Replaceable] readonly attribute USVString origin;
// base64 utility methods
DOMString btoa(DOMString data);
DOMString atob(DOMString data);
// timers
long setTimeout(TimerHandler handler, optional long timeout = 0, any... arguments);
void clearTimeout(optional long handle = 0);
long setInterval(TimerHandler handler, optional long timeout = 0, any... arguments);
void clearInterval(optional long handle = 0);
// 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);
};
WorkerGlobalScope implements WindowOrWorkerGlobalScope;
[Exposed=Worker]
interface WorkerNavigator {};
WorkerNavigator implements NavigatorID;
WorkerNavigator implements NavigatorLanguage;
WorkerNavigator implements NavigatorOnLine;
WorkerNavigator implements NavigatorConcurrentHardware;
[NoInterfaceObject, Exposed=(Window,Worker)]
interface NavigatorID {
readonly attribute DOMString appCodeName; // constant "Mozilla"
readonly attribute DOMString appName; // constant "Netscape"
readonly attribute DOMString appVersion;
readonly attribute DOMString platform;
readonly attribute DOMString product; // constant "Gecko"
[Exposed=Window] readonly attribute DOMString productSub;
readonly attribute DOMString userAgent;
[Exposed=Window] readonly attribute DOMString vendor;
[Exposed=Window] readonly attribute DOMString vendorSub; // constant ""
// also has additional members in a partial interface
};
[NoInterfaceObject, Exposed=(Window,Worker)]
interface NavigatorLanguage {
readonly attribute DOMString language;
readonly attribute FrozenArray<DOMString> languages;
};
[NoInterfaceObject, Exposed=(Window,Worker)]
interface NavigatorOnLine {
readonly attribute boolean onLine;
};
[NoInterfaceObject, Exposed=(Window,Worker)]
interface NavigatorConcurrentHardware {
readonly attribute unsigned long long hardwareConcurrency;
};
[Exposed=Worker]
interface WorkerLocation {
stringifier readonly attribute USVString href;
readonly attribute USVString origin;
readonly attribute USVString protocol;
readonly attribute USVString host;
readonly attribute USVString hostname;
readonly attribute USVString port;
readonly attribute USVString pathname;
readonly attribute USVString search;
readonly attribute USVString hash;
};

View file

@ -1,5 +1,5 @@
[Constructor(DOMString type, optional EventInit eventInitDict)/*,
Exposed=(Window,Worker)*/]
[Constructor(DOMString type, optional EventInit eventInitDict),
Exposed=(Window,Worker)]
interface Event {
readonly attribute DOMString type;
readonly attribute EventTarget? target;
@ -31,8 +31,8 @@ dictionary EventInit {
};
[Constructor(DOMString type, optional CustomEventInit eventInitDict)/*,
Exposed=(Window,Worker)*/]
[Constructor(DOMString type, optional CustomEventInit eventInitDict),
Exposed=(Window,Worker)]
interface CustomEvent : Event {
readonly attribute any detail;
@ -44,7 +44,8 @@ dictionary CustomEventInit : EventInit {
};
//[Exposed=(Window,Worker)]
[Constructor,
Exposed=(Window,Worker)]
interface EventTarget {
void addEventListener(DOMString type, EventListener? callback, optional (EventListenerOptions or boolean) options);
void removeEventListener(DOMString type, EventListener? callback, optional (EventListenerOptions or boolean) options);
@ -61,6 +62,23 @@ dictionary EventListenerOptions {
};
[Constructor,
Exposed=(Window,Worker)]
interface AbortController {
[SameObject] readonly attribute AbortSignal signal;
void abort();
};
[Exposed=(Window,Worker)]
interface AbortSignal : EventTarget {
readonly attribute boolean aborted;
attribute EventHandler onabort;
};
[NoInterfaceObject,
Exposed=Window]
interface NonElementParentNode {
@ -402,7 +420,7 @@ interface Attr : Node {
[Exposed=Window]
interface CharacterData : Node {
[TreatNullAs=EmptyString] attribute DOMString data;
attribute [TreatNullAs=EmptyString] DOMString data;
readonly attribute unsigned long length;
DOMString substringData(unsigned long offset, unsigned long count);
void appendData(DOMString data);

View file

@ -12,7 +12,7 @@ interface DOMPointReadOnly {
DOMPoint matrixTransform(optional DOMMatrixInit matrix);
serializer = { attribute };
[Default] toJSON();
};
[Constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
@ -52,7 +52,7 @@ interface DOMRectReadOnly {
readonly attribute unrestricted double bottom;
readonly attribute unrestricted double left;
serializer = { attribute };
[Default] toJSON();
};
[Constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
@ -76,6 +76,13 @@ dictionary DOMRectInit {
unrestricted double height = 0;
};
[NoInterfaceObject,
LegacyArrayClass]
interface DOMRectList {
readonly attribute unsigned long length;
getter DOMRect? item(unsigned long index);
};
[Constructor(optional DOMPointInit p1, optional DOMPointInit p2,
optional DOMPointInit p3, optional DOMPointInit p4),
Exposed=(Window,Worker),
@ -90,7 +97,7 @@ interface DOMQuad {
[SameObject] readonly attribute DOMPoint p4;
[NewObject] DOMRect getBounds();
serializer = { attribute };
[Default] toJSON();
};
dictionary DOMQuadInit {
@ -171,7 +178,7 @@ interface DOMMatrixReadOnly {
[NewObject] Float64Array toFloat64Array();
[Exposed=Window] stringifier;
serializer = { attribute };
[Default] toJSON();
};
[Constructor(optional (DOMString or sequence<unrestricted double>) init),
@ -240,7 +247,7 @@ interface DOMMatrix : DOMMatrixReadOnly {
[Exposed=Window] DOMMatrix setMatrixValue(DOMString transformList);
};
dictionary DOMMatrixInit {
dictionary DOMMatrix2DInit {
unrestricted double a;
unrestricted double b;
unrestricted double c;
@ -249,18 +256,21 @@ dictionary DOMMatrixInit {
unrestricted double f;
unrestricted double m11;
unrestricted double m12;
unrestricted double m13 = 0;
unrestricted double m14 = 0;
unrestricted double m21;
unrestricted double m22;
unrestricted double m41;
unrestricted double m42;
};
dictionary DOMMatrixInit : DOMMatrix2DInit {
unrestricted double m13 = 0;
unrestricted double m14 = 0;
unrestricted double m23 = 0;
unrestricted double m24 = 0;
unrestricted double m31 = 0;
unrestricted double m32 = 0;
unrestricted double m33 = 1;
unrestricted double m34 = 0;
unrestricted double m41;
unrestricted double m42;
unrestricted double m43 = 0;
unrestricted double m44 = 1;
boolean is2D;

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,55 @@
[SecureContext,
Exposed=(Window,Worker)]
interface PaymentManager {
[SameObject]
readonly attribute PaymentInstruments instruments;
[Exposed=Window] static Promise<PermissionState> requestPermission();
};
[SecureContext,
Exposed=(Window,Worker)]
interface PaymentInstruments {
Promise<boolean> delete(DOMString instrumentKey);
Promise<PaymentInstrument> get(DOMString instrumentKey);
Promise<sequence<DOMString>> keys();
Promise<boolean> has(DOMString instrumentKey);
Promise<void> set(DOMString instrumentKey,
PaymentInstrument details);
Promise<void> clear();
};
dictionary PaymentInstrument {
required DOMString name;
sequence<ImageObject> icons;
sequence<DOMString> enabledMethods;
object capabilities;
};
dictionary ImageObject {
required USVString src;
DOMString sizes;
DOMString type;
};
[Constructor(DOMString type, PaymentRequestEventInit eventInitDict),
Exposed=ServiceWorker]
interface PaymentRequestEvent : ExtendableEvent {
readonly attribute USVString topLevelOrigin;
readonly attribute USVString paymentRequestOrigin;
readonly attribute DOMString paymentRequestId;
readonly attribute FrozenArray<PaymentMethodData> methodData;
readonly attribute object total;
readonly attribute FrozenArray<PaymentDetailsModifier> modifiers;
readonly attribute DOMString instrumentKey;
Promise<WindowClient?> openWindow(USVString url);
void respondWith(Promise<PaymentHandlerResponse> handlerResponse);
};
dictionary PaymentRequestEventInit : ExtendableEventInit {
USVString topLevelOrigin;
USVString paymentRequestOrigin;
DOMString paymentRequestId;
sequence<PaymentMethodData> methodData;
PaymentCurrencyAmount total;
sequence<PaymentDetailsModifier> modifiers;
DOMString instrumentKey;
};
dictionary PaymentHandlerResponse {
DOMString methodName;
object details;
};

View file

@ -0,0 +1,114 @@
[Constructor(sequence<PaymentMethodData> methodData, PaymentDetailsInit details, optional PaymentOptions options),
SecureContext,
Exposed=Window]
interface PaymentRequest : EventTarget {
Promise<PaymentResponse> show();
Promise<void> abort();
Promise<boolean> canMakePayment();
readonly attribute DOMString id;
readonly attribute PaymentAddress? shippingAddress;
readonly attribute DOMString? shippingOption;
readonly attribute PaymentShippingType? shippingType;
attribute EventHandler onshippingaddresschange;
attribute EventHandler onshippingoptionchange;
};
dictionary PaymentMethodData {
required DOMString supportedMethods;
object data;
};
dictionary PaymentCurrencyAmount {
required DOMString currency;
required DOMString value;
// Note: currencySystem is "at risk" of being removed!
DOMString currencySystem = "urn:iso:std:iso:4217";
};
dictionary PaymentDetailsBase {
sequence<PaymentItem> displayItems;
sequence<PaymentShippingOption> shippingOptions;
sequence<PaymentDetailsModifier> modifiers;
};
dictionary PaymentDetailsInit : PaymentDetailsBase {
DOMString id;
required PaymentItem total;
};
dictionary PaymentDetailsUpdate : PaymentDetailsBase {
DOMString error;
PaymentItem total;
};
dictionary PaymentDetailsModifier {
required DOMString supportedMethods;
PaymentItem total;
sequence<PaymentItem> additionalDisplayItems;
object data;
};
enum PaymentShippingType {
"shipping",
"delivery",
"pickup"
};
dictionary PaymentOptions {
boolean requestPayerName = false;
boolean requestPayerEmail = false;
boolean requestPayerPhone = false;
boolean requestShipping = false;
PaymentShippingType shippingType = "shipping";
};
dictionary PaymentItem {
required DOMString label;
required PaymentCurrencyAmount amount;
boolean pending = false;
};
[SecureContext,
Exposed=Window]
interface PaymentAddress {
[Default] object toJSON();
readonly attribute DOMString country;
readonly attribute FrozenArray<DOMString> addressLine;
readonly attribute DOMString region;
readonly attribute DOMString city;
readonly attribute DOMString dependentLocality;
readonly attribute DOMString postalCode;
readonly attribute DOMString sortingCode;
readonly attribute DOMString languageCode;
readonly attribute DOMString organization;
readonly attribute DOMString recipient;
readonly attribute DOMString phone;
};
dictionary PaymentShippingOption {
required DOMString id;
required DOMString label;
required PaymentCurrencyAmount amount;
boolean selected = false;
};
enum PaymentComplete {
"fail",
"success",
"unknown"
};
[SecureContext,
Exposed=Window]
interface PaymentResponse {
[Default] object toJSON();
readonly attribute DOMString requestId;
readonly attribute DOMString methodName;
readonly attribute object details;
readonly attribute PaymentAddress? shippingAddress;
readonly attribute DOMString? shippingOption;
readonly attribute DOMString? payerName;
readonly attribute DOMString? payerEmail;
readonly attribute DOMString? payerPhone;
Promise<void> complete(optional PaymentComplete result = "unknown");
};
[Constructor(DOMString type, optional PaymentRequestUpdateEventInit eventInitDict),
SecureContext,
Exposed=Window]
interface PaymentRequestUpdateEvent : Event {
void updateWith(Promise<PaymentDetailsUpdate> detailsPromise);
};
dictionary PaymentRequestUpdateEventInit : EventInit {
};

View file

@ -1,23 +1,29 @@
[Exposed=Window]
interface RemotePlayback : EventTarget {
Promise<long> watchAvailability(RemotePlaybackAvailabilityCallback callback);
Promise<void> cancelWatchAvailability(optional long id);
readonly attribute RemotePlaybackState state;
attribute EventHandler onconnecting;
attribute EventHandler onconnect;
attribute EventHandler ondisconnect;
Promise<void> prompt();
};
enum RemotePlaybackState {
"connecting",
"connected",
"disconnected"
};
callback RemotePlaybackAvailabilityCallback = void(boolean available);
interface RemotePlayback : EventTarget {
readonly attribute RemotePlaybackState state;
attribute EventHandler onconnecting;
attribute EventHandler onconnect;
attribute EventHandler ondisconnect;
Promise<long> watchAvailability(RemotePlaybackAvailabilityCallback callback);
Promise<void> cancelWatchAvailability(optional long id);
Promise<void> prompt();
};
callback RemotePlaybackAvailabilityCallback = void (boolean available);
partial interface HTMLMediaElement {
[SameObject]
readonly attribute RemotePlayback remote;
attribute boolean disableRemotePlayback;
[CEReactions]
attribute boolean disableRemotePlayback;
};

View file

@ -1,60 +1,151 @@
[Constructor(DOMString type, optional UIEventInit eventInitDict)]
interface UIEvent : Event {
readonly attribute WindowProxy? view;
readonly attribute long detail;
readonly attribute Window? view;
readonly attribute long detail;
};
dictionary UIEventInit : EventInit {
WindowProxy? view = null;
long detail = 0;
Window? view = null;
long detail = 0;
};
[Constructor(DOMString typeArg, optional MouseEventInit mouseEventInitDict)]
[Constructor(DOMString type, optional FocusEventInit eventInitDict)]
interface FocusEvent : UIEvent {
readonly attribute EventTarget? relatedTarget;
};
dictionary FocusEventInit : UIEventInit {
EventTarget? relatedTarget = null;
};
[Constructor(DOMString type, optional MouseEventInit eventInitDict)]
interface MouseEvent : UIEvent {
readonly attribute long screenX;
readonly attribute long screenY;
readonly attribute long clientX;
readonly attribute long clientY;
readonly attribute boolean ctrlKey;
readonly attribute boolean shiftKey;
readonly attribute boolean altKey;
readonly attribute boolean metaKey;
readonly attribute short button;
readonly attribute EventTarget? relatedTarget;
// Introduced in DOM Level 3
readonly attribute unsigned short buttons;
boolean getModifierState (DOMString keyArg);
readonly attribute long screenX;
readonly attribute long screenY;
readonly attribute long clientX;
readonly attribute long clientY;
readonly attribute boolean ctrlKey;
readonly attribute boolean shiftKey;
readonly attribute boolean altKey;
readonly attribute boolean metaKey;
readonly attribute short button;
readonly attribute unsigned short buttons;
readonly attribute EventTarget? relatedTarget;
boolean getModifierState(DOMString keyArg);
};
dictionary MouseEventInit : EventModifierInit {
long screenX = 0;
long screenY = 0;
long clientX = 0;
long clientY = 0;
short button = 0;
unsigned short buttons = 0;
EventTarget? relatedTarget = null;
long screenX = 0;
long screenY = 0;
long clientX = 0;
long clientY = 0;
short button = 0;
unsigned short buttons = 0;
EventTarget? relatedTarget = null;
};
dictionary EventModifierInit : UIEventInit {
boolean ctrlKey = false;
boolean shiftKey = false;
boolean altKey = false;
boolean metaKey = false;
boolean keyModifierStateAltGraph = false;
boolean keyModifierStateCapsLock = false;
boolean keyModifierStateFn = false;
boolean keyModifierStateFnLock = false;
boolean keyModifierStateHyper = false;
boolean keyModifierStateNumLock = false;
boolean keyModifierStateOS = false;
boolean keyModifierStateScrollLock = false;
boolean keyModifierStateSuper = false;
boolean keyModifierStateSymbol = false;
boolean keyModifierStateSymbolLock = false;
boolean ctrlKey = false;
boolean shiftKey = false;
boolean altKey = false;
boolean metaKey = false;
boolean modifierAltGraph = false;
boolean modifierCapsLock = false;
boolean modifierFn = false;
boolean modifierFnLock = false;
boolean modifierHyper = false;
boolean modifierNumLock = false;
boolean modifierScrollLock = false;
boolean modifierSuper = false;
boolean modifierSymbol = false;
boolean modifierSymbolLock = false;
};
partial interface MouseEvent {
// Deprecated in DOM Level 3
void initMouseEvent (DOMString typeArg, boolean bubblesArg, boolean cancelableArg, Window? viewArg, long detailArg, long screenXArg, long screenYArg, long clientXArg, long clientYArg, boolean ctrlKeyArg, boolean altKeyArg, boolean shiftKeyArg, boolean metaKeyArg, short buttonArg, EventTarget? relatedTargetArg);
[Constructor(DOMString type, optional WheelEventInit eventInitDict)]
interface WheelEvent : MouseEvent {
// DeltaModeCode
const unsigned long DOM_DELTA_PIXEL = 0x00;
const unsigned long DOM_DELTA_LINE = 0x01;
const unsigned long DOM_DELTA_PAGE = 0x02;
readonly attribute double deltaX;
readonly attribute double deltaY;
readonly attribute double deltaZ;
readonly attribute unsigned long deltaMode;
};
dictionary WheelEventInit : MouseEventInit {
double deltaX = 0.0;
double deltaY = 0.0;
double deltaZ = 0.0;
unsigned long deltaMode = 0;
};
[Constructor(DOMString type, optional InputEventInit eventInitDict)]
interface InputEvent : UIEvent {
readonly attribute DOMString? data;
readonly attribute boolean isComposing;
};
dictionary InputEventInit : UIEventInit {
DOMString? data = "";
boolean isComposing = false;
};
[Constructor(DOMString type, optional KeyboardEventInit eventInitDict)]
interface KeyboardEvent : UIEvent {
// KeyLocationCode
const unsigned long DOM_KEY_LOCATION_STANDARD = 0x00;
const unsigned long DOM_KEY_LOCATION_LEFT = 0x01;
const unsigned long DOM_KEY_LOCATION_RIGHT = 0x02;
const unsigned long DOM_KEY_LOCATION_NUMPAD = 0x03;
readonly attribute DOMString key;
readonly attribute DOMString code;
readonly attribute unsigned long location;
readonly attribute boolean ctrlKey;
readonly attribute boolean shiftKey;
readonly attribute boolean altKey;
readonly attribute boolean metaKey;
readonly attribute boolean repeat;
readonly attribute boolean isComposing;
boolean getModifierState(DOMString keyArg);
};
dictionary KeyboardEventInit : EventModifierInit {
DOMString key = "";
DOMString code = "";
unsigned long location = 0;
boolean repeat = false;
boolean isComposing = false;
};
[Constructor(DOMString type, optional CompositionEventInit eventInitDict)]
interface CompositionEvent : UIEvent {
readonly attribute DOMString data;
};
dictionary CompositionEventInit : UIEventInit {
DOMString data = "";
};
partial interface UIEvent {
// The following support legacy user agents
readonly attribute unsigned long which;
};
partial interface KeyboardEvent {
// The following support legacy user agents
readonly attribute unsigned long charCode;
readonly attribute unsigned long keyCode;
};

View file

@ -0,0 +1,12 @@
// https://wicg.github.io/web-share/
partial interface Navigator {
[SecureContext]
Promise<void> share(optional ShareData data);
};
dictionary ShareData {
USVString title;
USVString text;
USVString url;
};

View file

@ -0,0 +1,44 @@
typedef (Int8Array or Int16Array or Int32Array or
Uint8Array or Uint16Array or Uint32Array or Uint8ClampedArray or
Float32Array or Float64Array or DataView) ArrayBufferView;
typedef (ArrayBufferView or ArrayBuffer) BufferSource;
[
Exposed=(Window,Worker),
Constructor(optional DOMString message = "", optional DOMString name = "Error")]
interface DOMException { // but see below note about ECMAScript binding
readonly attribute DOMString name;
readonly attribute DOMString message;
readonly attribute unsigned short code;
const unsigned short INDEX_SIZE_ERR = 1;
const unsigned short DOMSTRING_SIZE_ERR = 2;
const unsigned short HIERARCHY_REQUEST_ERR = 3;
const unsigned short WRONG_DOCUMENT_ERR = 4;
const unsigned short INVALID_CHARACTER_ERR = 5;
const unsigned short NO_DATA_ALLOWED_ERR = 6;
const unsigned short NO_MODIFICATION_ALLOWED_ERR = 7;
const unsigned short NOT_FOUND_ERR = 8;
const unsigned short NOT_SUPPORTED_ERR = 9;
const unsigned short INUSE_ATTRIBUTE_ERR = 10;
const unsigned short INVALID_STATE_ERR = 11;
const unsigned short SYNTAX_ERR = 12;
const unsigned short INVALID_MODIFICATION_ERR = 13;
const unsigned short NAMESPACE_ERR = 14;
const unsigned short INVALID_ACCESS_ERR = 15;
const unsigned short VALIDATION_ERR = 16;
const unsigned short TYPE_MISMATCH_ERR = 17;
const unsigned short SECURITY_ERR = 18;
const unsigned short NETWORK_ERR = 19;
const unsigned short ABORT_ERR = 20;
const unsigned short URL_MISMATCH_ERR = 21;
const unsigned short QUOTA_EXCEEDED_ERR = 22;
const unsigned short TIMEOUT_ERR = 23;
const unsigned short INVALID_NODE_TYPE_ERR = 24;
const unsigned short DATA_CLONE_ERR = 25;
};
typedef unsigned long long DOMTimeStamp;
callback Function = any (any... arguments);
callback VoidFunction = void ();

View file

@ -1,3 +1,6 @@
// IDL definition extracted from
// https://w3c.github.io/webrtc-pc/archives/20170605/webrtc.html
dictionary RTCConfiguration {
sequence<RTCIceServer> iceServers;
RTCIceTransportPolicy iceTransportPolicy = "all";
@ -11,13 +14,18 @@ dictionary RTCConfiguration {
enum RTCIceCredentialType {
"password",
"token"
"oauth"
};
dictionary RTCOAuthCredential {
required DOMString macKey;
required DOMString accessToken;
};
dictionary RTCIceServer {
required (DOMString or sequence<DOMString>) urls;
DOMString username;
DOMString credential;
(DOMString or RTCOAuthCredential) credential;
RTCIceCredentialType credentialType = "password";
};
@ -56,31 +64,31 @@ interface RTCPeerConnection : EventTarget {
Promise<RTCSessionDescriptionInit> createOffer(optional RTCOfferOptions options);
Promise<RTCSessionDescriptionInit> createAnswer(optional RTCAnswerOptions options);
Promise<void> setLocalDescription(RTCSessionDescriptionInit description);
readonly attribute RTCSessionDescription? localDescription;
readonly attribute RTCSessionDescription? currentLocalDescription;
readonly attribute RTCSessionDescription? pendingLocalDescription;
readonly attribute RTCSessionDescription? localDescription;
readonly attribute RTCSessionDescription? currentLocalDescription;
readonly attribute RTCSessionDescription? pendingLocalDescription;
Promise<void> setRemoteDescription(RTCSessionDescriptionInit description);
readonly attribute RTCSessionDescription? remoteDescription;
readonly attribute RTCSessionDescription? currentRemoteDescription;
readonly attribute RTCSessionDescription? pendingRemoteDescription;
readonly attribute RTCSessionDescription? remoteDescription;
readonly attribute RTCSessionDescription? currentRemoteDescription;
readonly attribute RTCSessionDescription? pendingRemoteDescription;
Promise<void> addIceCandidate((RTCIceCandidateInit or RTCIceCandidate) candidate);
readonly attribute RTCSignalingState signalingState;
readonly attribute RTCIceGatheringState iceGatheringState;
readonly attribute RTCIceConnectionState iceConnectionState;
readonly attribute RTCPeerConnectionState connectionState;
readonly attribute boolean? canTrickleIceCandidates;
static readonly attribute FrozenArray<RTCIceServer> defaultIceServers;
readonly attribute RTCSignalingState signalingState;
readonly attribute RTCIceGatheringState iceGatheringState;
readonly attribute RTCIceConnectionState iceConnectionState;
readonly attribute RTCPeerConnectionState connectionState;
readonly attribute boolean? canTrickleIceCandidates;
static sequence<RTCIceServer> getDefaultIceServers();
RTCConfiguration getConfiguration();
void setConfiguration(RTCConfiguration configuration);
void close();
attribute EventHandler onnegotiationneeded;
attribute EventHandler onicecandidate;
attribute EventHandler onicecandidateerror;
attribute EventHandler onsignalingstatechange;
attribute EventHandler oniceconnectionstatechange;
attribute EventHandler onicegatheringstatechange;
attribute EventHandler onconnectionstatechange;
attribute EventHandler onfingerprintfailure;
attribute EventHandler onnegotiationneeded;
attribute EventHandler onicecandidate;
attribute EventHandler onicecandidateerror;
attribute EventHandler onsignalingstatechange;
attribute EventHandler oniceconnectionstatechange;
attribute EventHandler onicegatheringstatechange;
attribute EventHandler onconnectionstatechange;
attribute EventHandler onfingerprintfailure;
};
partial interface RTCPeerConnection {
@ -100,12 +108,17 @@ partial interface RTCPeerConnection {
RTCPeerConnectionErrorCallback failureCallback);
};
callback RTCPeerConnectionErrorCallback = void (DOMException error);
callback RTCSessionDescriptionCallback = void (RTCSessionDescriptionInit description);
enum RTCSignalingState {
"stable",
"have-local-offer",
"have-remote-offer",
"have-local-pranswer",
"have-remote-pranswer"
"have-remote-pranswer",
"closed"
};
enum RTCIceGatheringState {
@ -133,12 +146,6 @@ enum RTCIceConnectionState {
"closed"
};
callback RTCPeerConnectionErrorCallback = void (DOMException error);
callback RTCSessionDescriptionCallback = void (RTCSessionDescriptionInit description);
callback RTCStatsCallback = void (RTCStatsReport report);
enum RTCSdpType {
"offer",
"pranswer",
@ -158,12 +165,13 @@ dictionary RTCSessionDescriptionInit {
DOMString sdp = "";
};
[Constructor(RTCIceCandidateInit candidateInitDict)]
[Constructor(optional RTCIceCandidateInit candidateInitDict)]
interface RTCIceCandidate {
readonly attribute DOMString candidate;
readonly attribute DOMString? sdpMid;
readonly attribute unsigned short? sdpMLineIndex;
readonly attribute DOMString? foundation;
readonly attribute RTCIceComponent? component;
readonly attribute unsigned long? priority;
readonly attribute DOMString? ip;
readonly attribute RTCIceProtocol? protocol;
@ -244,9 +252,10 @@ dictionary RTCCertificateExpiration {
};
interface RTCCertificate {
readonly attribute DOMTimeStamp expires;
readonly attribute FrozenArray<RTCDtlsFingerprint> fingerprints;
AlgorithmIdentifier getAlgorithm();
readonly attribute DOMTimeStamp expires;
sequence<RTCDtlsFingerprint> getFingerprints();
// At risk due to lack of implementers' interest.
AlgorithmIdentifier getAlgorithm();
};
partial interface RTCPeerConnection {
@ -278,10 +287,12 @@ interface RTCRtpSender {
readonly attribute MediaStreamTrack? track;
readonly attribute RTCDtlsTransport? transport;
readonly attribute RTCDtlsTransport? rtcpTransport;
// Feature at risk
static RTCRtpCapabilities getCapabilities(DOMString kind);
Promise<void> setParameters(optional RTCRtpParameters parameters);
RTCRtpParameters getParameters();
Promise<void> replaceTrack(MediaStreamTrack withTrack);
Promise<void> setParameters(optional RTCRtpParameters parameters);
RTCRtpParameters getParameters();
Promise<void> replaceTrack(MediaStreamTrack withTrack);
Promise<RTCStatsReport> getStats();
};
dictionary RTCRtpParameters {
@ -290,7 +301,7 @@ dictionary RTCRtpParameters {
sequence<RTCRtpHeaderExtensionParameters> headerExtensions;
RTCRtcpParameters rtcp;
sequence<RTCRtpCodecParameters> codecs;
RTCDegradationPreference degradationPreference = "balanced";
RTCDegradationPreference degradationPreference;
};
dictionary RTCRtpEncodingParameters {
@ -300,10 +311,11 @@ dictionary RTCRtpEncodingParameters {
RTCDtxStatus dtx;
boolean active;
RTCPriorityType priority;
unsigned long ptime;
unsigned long maxBitrate;
unsigned long maxFramerate;
double maxFramerate;
DOMString rid;
double scaleResolutionDownBy = 1;
double scaleResolutionDownBy;
};
enum RTCDtxStatus {
@ -340,7 +352,7 @@ dictionary RTCRtpCodecParameters {
unsigned short payloadType;
DOMString mimeType;
unsigned long clockRate;
unsigned short channels = 1;
unsigned short channels;
DOMString sdpFmtpLine;
};
@ -352,7 +364,7 @@ dictionary RTCRtpCapabilities {
dictionary RTCRtpCodecCapability {
DOMString mimeType;
unsigned long clockRate;
unsigned short channels = 1;
unsigned short channels;
DOMString sdpFmtpLine;
};
@ -364,15 +376,24 @@ interface RTCRtpReceiver {
readonly attribute MediaStreamTrack track;
readonly attribute RTCDtlsTransport? transport;
readonly attribute RTCDtlsTransport? rtcpTransport;
static RTCRtpCapabilities getCapabilities(DOMString kind);
RTCRtpParameters getParameters();
sequence<RTCRtpContributingSource> getContributingSources();
// Feature at risk
static RTCRtpCapabilities getCapabilities(DOMString kind);
RTCRtpParameters getParameters();
sequence<RTCRtpContributingSource> getContributingSources();
sequence<RTCRtpSynchronizationSource> getSynchronizationSources();
Promise<RTCStatsReport> getStats();
};
interface RTCRtpContributingSource {
readonly attribute DOMHighResTimeStamp timestamp;
readonly attribute unsigned long source;
readonly attribute byte? audioLevel;
};
interface RTCRtpSynchronizationSource {
readonly attribute DOMHighResTimeStamp timestamp;
readonly attribute unsigned long source;
readonly attribute byte audioLevel;
readonly attribute boolean? voiceActivityFlag;
};
@ -465,6 +486,7 @@ enum RTCIceComponent {
interface RTCTrackEvent : Event {
readonly attribute RTCRtpReceiver receiver;
readonly attribute MediaStreamTrack track;
[SameObject]
readonly attribute FrozenArray<MediaStream> streams;
readonly attribute RTCRtpTransceiver transceiver;
};
@ -478,7 +500,7 @@ dictionary RTCTrackEventInit : EventInit {
partial interface RTCPeerConnection {
readonly attribute RTCSctpTransport? sctp;
RTCDataChannel createDataChannel([TreatNullAs=EmptyString] USVString label,
RTCDataChannel createDataChannel(USVString label,
optional RTCDataChannelInit dataChannelDict);
attribute EventHandler ondatachannel;
};
@ -575,9 +597,6 @@ dictionary RTCStats {
DOMString id;
};
enum RTCStatsType {
};
[Global,
Exposed=RTCIdentityProviderGlobalScope]
interface RTCIdentityProviderGlobalScope : WorkerGlobalScope {
@ -646,6 +665,20 @@ partial interface MediaStreamTrack {
attribute EventHandler onisolationchange;
};
enum RTCErrorDetailType {
"data-channel-failure",
"idp-bad-script-failure",
"idp-execution-failure",
"idp-load-failure",
"idp-need-login",
"idp-timeout",
"idp-tls-failure",
"idp-token-expired",
"idp-token-invalid",
"sctp-failure",
"sdp-syntax-error"
};
[Exposed=Window,
Constructor(DOMString type, RTCErrorEventInit eventInitDict)]
interface RTCErrorEvent : Event {

View file

@ -0,0 +1,176 @@
// Copied from https://wicg.github.io/webusb/#idl-index minus the
// definitions related to Permissions API integration which is unstable.
dictionary USBDeviceFilter {
unsigned short vendorId;
unsigned short productId;
octet classCode;
octet subclassCode;
octet protocolCode;
DOMString serialNumber;
};
dictionary USBDeviceRequestOptions {
required sequence<USBDeviceFilter> filters;
};
interface USB : EventTarget {
attribute EventHandler onconnect;
attribute EventHandler ondisconnect;
Promise<sequence<USBDevice>> getDevices();
Promise<USBDevice> requestDevice(USBDeviceRequestOptions options);
};
[SecureContext]
partial interface Navigator {
[SameObject] readonly attribute USB usb;
};
dictionary USBConnectionEventInit : EventInit {
required USBDevice device;
};
[Constructor(DOMString type, USBConnectionEventInit eventInitDict)]
interface USBConnectionEvent : Event {
[SameObject] readonly attribute USBDevice device;
};
interface USBDevice {
readonly attribute octet usbVersionMajor;
readonly attribute octet usbVersionMinor;
readonly attribute octet usbVersionSubminor;
readonly attribute octet deviceClass;
readonly attribute octet deviceSubclass;
readonly attribute octet deviceProtocol;
readonly attribute unsigned short vendorId;
readonly attribute unsigned short productId;
readonly attribute octet deviceVersionMajor;
readonly attribute octet deviceVersionMinor;
readonly attribute octet deviceVersionSubminor;
readonly attribute DOMString? manufacturerName;
readonly attribute DOMString? productName;
readonly attribute DOMString? serialNumber;
readonly attribute USBConfiguration? configuration;
readonly attribute FrozenArray<USBConfiguration> configurations;
readonly attribute boolean opened;
Promise<void> open();
Promise<void> close();
Promise<void> selectConfiguration(octet configurationValue);
Promise<void> claimInterface(octet interfaceNumber);
Promise<void> releaseInterface(octet interfaceNumber);
Promise<void> selectAlternateInterface(octet interfaceNumber, octet alternateSetting);
Promise<USBInTransferResult> controlTransferIn(USBControlTransferParameters setup, unsigned short length);
Promise<USBOutTransferResult> controlTransferOut(USBControlTransferParameters setup, optional BufferSource data);
Promise<void> clearHalt(USBDirection direction, octet endpointNumber);
Promise<USBInTransferResult> transferIn(octet endpointNumber, unsigned long length);
Promise<USBOutTransferResult> transferOut(octet endpointNumber, BufferSource data);
Promise<USBIsochronousInTransferResult> isochronousTransferIn(octet endpointNumber, sequence<unsigned long> packetLengths);
Promise<USBIsochronousOutTransferResult> isochronousTransferOut(octet endpointNumber, BufferSource data, sequence<unsigned long> packetLengths);
Promise<void> reset();
};
enum USBRequestType {
"standard",
"class",
"vendor"
};
enum USBRecipient {
"device",
"interface",
"endpoint",
"other"
};
enum USBTransferStatus {
"ok",
"stall",
"babble"
};
dictionary USBControlTransferParameters {
required USBRequestType requestType;
required USBRecipient recipient;
required octet request;
required unsigned short value;
required unsigned short index;
};
[Constructor(USBTransferStatus status, optional DataView? data)]
interface USBInTransferResult {
readonly attribute DataView? data;
readonly attribute USBTransferStatus status;
};
[Constructor(USBTransferStatus status, optional unsigned long bytesWritten = 0)]
interface USBOutTransferResult {
readonly attribute unsigned long bytesWritten;
readonly attribute USBTransferStatus status;
};
[Constructor(USBTransferStatus status, optional DataView? data)]
interface USBIsochronousInTransferPacket {
readonly attribute DataView? data;
readonly attribute USBTransferStatus status;
};
[Constructor(sequence<USBIsochronousInTransferPacket> packets, optional DataView? data)]
interface USBIsochronousInTransferResult {
readonly attribute DataView? data;
readonly attribute FrozenArray<USBIsochronousInTransferPacket> packets;
};
[Constructor(USBTransferStatus status, optional unsigned long bytesWritten = 0)]
interface USBIsochronousOutTransferPacket {
readonly attribute unsigned long bytesWritten;
readonly attribute USBTransferStatus status;
};
[Constructor(sequence<USBIsochronousOutTransferPacket> packets)]
interface USBIsochronousOutTransferResult {
readonly attribute FrozenArray<USBIsochronousOutTransferPacket> packets;
};
[Constructor(USBDevice device, octet configurationValue)]
interface USBConfiguration {
readonly attribute octet configurationValue;
readonly attribute DOMString? configurationName;
readonly attribute FrozenArray<USBInterface> interfaces;
};
[Constructor(USBConfiguration configuration, octet interfaceNumber)]
interface USBInterface {
readonly attribute octet interfaceNumber;
readonly attribute USBAlternateInterface alternate;
readonly attribute FrozenArray<USBAlternateInterface> alternates;
readonly attribute boolean claimed;
};
[Constructor(USBInterface deviceInterface, octet alternateSetting)]
interface USBAlternateInterface {
readonly attribute octet alternateSetting;
readonly attribute octet interfaceClass;
readonly attribute octet interfaceSubclass;
readonly attribute octet interfaceProtocol;
readonly attribute DOMString? interfaceName;
readonly attribute FrozenArray<USBEndpoint> endpoints;
};
enum USBDirection {
"in",
"out"
};
enum USBEndpointType {
"bulk",
"interrupt",
"isochronous"
};
[Constructor(USBAlternateInterface alternate, octet endpointNumber, USBDirection direction)]
interface USBEndpoint {
readonly attribute octet endpointNumber;
readonly attribute USBDirection direction;
readonly attribute USBEndpointType type;
readonly attribute unsigned long packetSize;
};