1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 04:27:44 +00:00

LibWeb: Add comments and missing items of various IDL files

This commit is contained in:
Bastiaan van der Plaat 2023-10-25 17:27:19 +02:00 committed by Andreas Kling
parent fc46def2f5
commit 169d24ae2e
75 changed files with 233 additions and 129 deletions

View file

@ -1,5 +1,6 @@
#import <CSS/CSSGroupingRule.idl> #import <CSS/CSSGroupingRule.idl>
// https://drafts.csswg.org/css-conditional-3/#the-cssconditionrule-interface
[Exposed=Window] [Exposed=Window]
interface CSSConditionRule : CSSGroupingRule { interface CSSConditionRule : CSSGroupingRule {
attribute CSSOMString conditionText; attribute CSSOMString conditionText;

View file

@ -1,6 +1,7 @@
#import <CSS/CSSRule.idl> #import <CSS/CSSRule.idl>
#import <CSS/CSSStyleDeclaration.idl> #import <CSS/CSSStyleDeclaration.idl>
// https://drafts.csswg.org/css-fonts/#om-fontface
[Exposed=Window] [Exposed=Window]
interface CSSFontFaceRule : CSSRule { interface CSSFontFaceRule : CSSRule {
readonly attribute CSSStyleDeclaration style; readonly attribute CSSStyleDeclaration style;

View file

@ -1,6 +1,7 @@
#import <CSS/CSSRule.idl> #import <CSS/CSSRule.idl>
#import <CSS/CSSRuleList.idl> #import <CSS/CSSRuleList.idl>
// https://drafts.csswg.org/cssom/#the-cssgroupingrule-interface
[Exposed=Window] [Exposed=Window]
interface CSSGroupingRule : CSSRule { interface CSSGroupingRule : CSSRule {
[SameObject, ImplementedAs=css_rules_for_bindings] readonly attribute CSSRuleList cssRules; [SameObject, ImplementedAs=css_rules_for_bindings] readonly attribute CSSRuleList cssRules;

View file

@ -2,9 +2,12 @@
#import <CSS/CSSStyleSheet.idl> #import <CSS/CSSStyleSheet.idl>
#import <CSS/MediaList.idl> #import <CSS/MediaList.idl>
// https://drafts.csswg.org/cssom/#the-cssimportrule-interface
[Exposed=Window] [Exposed=Window]
interface CSSImportRule : CSSRule { interface CSSImportRule : CSSRule {
readonly attribute USVString href; readonly attribute USVString href;
// [SameObject, PutForwards=mediaText] readonly attribute MediaList media; // FIXME: [SameObject, PutForwards=mediaText] readonly attribute MediaList media;
[SameObject, ImplementedAs=style_sheet_for_bindings] readonly attribute CSSStyleSheet styleSheet; [SameObject, ImplementedAs=style_sheet_for_bindings] readonly attribute CSSStyleSheet styleSheet;
// FIXME: readonly attribute CSSOMString? layerName;
// FIXME: readonly attribute CSSOMString? supportsText;
}; };

View file

@ -1,5 +1,6 @@
#import <CSS/CSSRule.idl> #import <CSS/CSSRule.idl>
// https://drafts.csswg.org/css-animations-1/#interface-csskeyframerule-idl
[Exposed=Window] [Exposed=Window]
interface CSSKeyframeRule : CSSRule { interface CSSKeyframeRule : CSSRule {
attribute CSSOMString keyText; attribute CSSOMString keyText;

View file

@ -1,17 +1,14 @@
#import <CSS/CSSRule.idl> #import <CSS/CSSRule.idl>
// https://drafts.csswg.org/css-animations-1/#interface-csskeyframesrule
[Exposed=Window] [Exposed=Window]
interface CSSKeyframesRule : CSSRule { interface CSSKeyframesRule : CSSRule {
attribute CSSOMString name; attribute CSSOMString name;
// FIXME: readonly attribute CSSRuleList cssRules;
readonly attribute unsigned long length; readonly attribute unsigned long length;
// FIXME: Implement this
// readonly attribute CSSRuleList cssRules;
getter CSSKeyframeRule (unsigned long index); getter CSSKeyframeRule (unsigned long index);
// FIXME: undefined appendRule(CSSOMString rule);
// FIXME: Implement these // FIXME: undefined deleteRule(CSSOMString select);
// undefined appendRule(CSSOMString rule); // FIXME: CSSKeyframeRule? findRule(CSSOMString select);
// undefined deleteRule(CSSOMString select);
// CSSKeyframeRule? findRule(CSSOMString select);
}; };

View file

@ -1,6 +1,7 @@
#import <CSS/CSSConditionRule.idl> #import <CSS/CSSConditionRule.idl>
#import <CSS/MediaList.idl> #import <CSS/MediaList.idl>
// https://drafts.csswg.org/css-conditional-3/#the-cssmediarule-interface
[Exposed=Window] [Exposed=Window]
interface CSSMediaRule : CSSConditionRule { interface CSSMediaRule : CSSConditionRule {
[SameObject, PutForwards=mediaText] readonly attribute MediaList media; [SameObject, PutForwards=mediaText] readonly attribute MediaList media;

View file

@ -1,15 +1,15 @@
#import <CSS/CSSStyleSheet.idl> #import <CSS/CSSStyleSheet.idl>
// https://www.w3.org/TR/cssom/#the-cssrule-interface
[Exposed=Window] [Exposed=Window]
interface CSSRule { interface CSSRule {
attribute CSSOMString cssText; attribute CSSOMString cssText;
readonly attribute CSSRule? parentRule; readonly attribute CSSRule? parentRule;
readonly attribute CSSStyleSheet? parentStyleSheet; readonly attribute CSSStyleSheet? parentStyleSheet;
// the following attribute and constants are historical
readonly attribute unsigned short type; readonly attribute unsigned short type;
const unsigned short STYLE_RULE = 1; const unsigned short STYLE_RULE = 1;
const unsigned short CHARSET_RULE = 2; const unsigned short CHARSET_RULE = 2;
const unsigned short IMPORT_RULE = 3; const unsigned short IMPORT_RULE = 3;

View file

@ -1,5 +1,6 @@
#import <CSS/CSSRule.idl> #import <CSS/CSSRule.idl>
// https://www.w3.org/TR/cssom/#the-cssrulelist-interface
[Exposed=Window] [Exposed=Window]
interface CSSRuleList { interface CSSRuleList {

View file

@ -15,4 +15,5 @@ interface CSSStyleDeclaration {
// FIXME: readonly attribute CSSRule? parentRule; // FIXME: readonly attribute CSSRule? parentRule;
// FIXME: [CEReactions] attribute [LegacyNullToEmptyString] CSSOMString cssFloat; // FIXME: [CEReactions] attribute [LegacyNullToEmptyString] CSSOMString cssFloat;
}; };

View file

@ -1,6 +1,7 @@
#import <CSS/CSSRule.idl> #import <CSS/CSSRule.idl>
#import <CSS/CSSStyleDeclaration.idl> #import <CSS/CSSStyleDeclaration.idl>
// https://drafts.csswg.org/cssom/#the-cssstylerule-interface
[Exposed=Window] [Exposed=Window]
interface CSSStyleRule : CSSRule { interface CSSStyleRule : CSSRule {

View file

@ -4,9 +4,24 @@
// https://drafts.csswg.org/cssom/#cssstylesheet // https://drafts.csswg.org/cssom/#cssstylesheet
[Exposed=Window] [Exposed=Window]
interface CSSStyleSheet : StyleSheet { interface CSSStyleSheet : StyleSheet {
// readonly attribute CSSRule? ownerRule; // FIXME: constructor(optional CSSStyleSheetInit options = {});
// FIXME: readonly attribute CSSRule? ownerRule;
[SameObject] readonly attribute CSSRuleList cssRules; [SameObject] readonly attribute CSSRuleList cssRules;
unsigned long insertRule(CSSOMString rule, optional unsigned long index = 0); unsigned long insertRule(CSSOMString rule, optional unsigned long index = 0);
undefined deleteRule(unsigned long index); undefined deleteRule(unsigned long index);
// FIXME: Promise<CSSStyleSheet> replace(USVString text);
// FIXME: undefined replaceSync(USVString text);
// https://drafts.csswg.org/cssom/#legacy-css-style-sheet-members
// FIXME: [SameObject] readonly attribute CSSRuleList rules;
// FIXME: long addRule(optional DOMString selector = "undefined", optional DOMString style = "undefined", optional unsigned long index);
undefined removeRule(unsigned long index); undefined removeRule(unsigned long index);
}; };
dictionary CSSStyleSheetInit {
DOMString baseURL = null;
(MediaList or DOMString) media = "";
boolean disabled = false;
};

View file

@ -1,5 +1,6 @@
#import <CSS/CSSConditionRule.idl> #import <CSS/CSSConditionRule.idl>
// https://drafts.csswg.org/css-conditional-3/#the-csssupportsrule-interface
[Exposed=Window] [Exposed=Window]
interface CSSSupportsRule : CSSConditionRule { interface CSSSupportsRule : CSSConditionRule {
}; };

View file

@ -1,3 +1,4 @@
// https://www.w3.org/TR/cssom-1/#the-medialist-interface
[Exposed=Window] [Exposed=Window]
interface MediaList { interface MediaList {
[LegacyNullToEmptyString] stringifier attribute CSSOMString mediaText; [LegacyNullToEmptyString] stringifier attribute CSSOMString mediaText;

View file

@ -1,6 +1,7 @@
#import <DOM/EventTarget.idl> #import <DOM/EventTarget.idl>
#import <DOM/EventHandler.idl> #import <DOM/EventHandler.idl>
// https://drafts.csswg.org/cssom-view/#the-mediaquerylist-interface
[Exposed=Window] [Exposed=Window]
interface MediaQueryList : EventTarget { interface MediaQueryList : EventTarget {
readonly attribute CSSOMString media; readonly attribute CSSOMString media;

View file

@ -6,10 +6,12 @@
[Exposed=Window] [Exposed=Window]
interface StyleSheet { interface StyleSheet {
readonly attribute Element? ownerNode;
readonly attribute CSSOMString type; readonly attribute CSSOMString type;
readonly attribute USVString? href; readonly attribute USVString? href;
// FIXME: readonly attribute (Element or ProcessingInstruction)? ownerNode;
readonly attribute Element? ownerNode;
readonly attribute CSSStyleSheet? parentStyleSheet; readonly attribute CSSStyleSheet? parentStyleSheet;
readonly attribute DOMString? title; readonly attribute DOMString? title;
[SameObject, PutForwards=mediaText] readonly attribute MediaList media; [SameObject, PutForwards=mediaText] readonly attribute MediaList media;

View file

@ -1,5 +1,6 @@
#import <CSS/CSSStyleSheet.idl> #import <CSS/CSSStyleSheet.idl>
// https://drafts.csswg.org/cssom/#the-stylesheetlist-interface
[Exposed=Window] [Exposed=Window]
interface StyleSheetList { interface StyleSheetList {
getter CSSStyleSheet? item(unsigned long index); getter CSSStyleSheet? item(unsigned long index);

View file

@ -1,5 +1,6 @@
#import <DOM/EventTarget.idl> #import <DOM/EventTarget.idl>
// https://drafts.csswg.org/cssom-view/#the-visualviewport-interface
[Exposed=Window] [Exposed=Window]
interface VisualViewport : EventTarget { interface VisualViewport : EventTarget {

View file

@ -1,11 +1,12 @@
#import <Crypto/SubtleCrypto.idl> #import <Crypto/SubtleCrypto.idl>
// https://w3c.github.io/webcrypto/#crypto-interface
[Exposed=(Window,Worker)] [Exposed=(Window,Worker)]
interface Crypto { interface Crypto {
[SecureContext] readonly attribute SubtleCrypto subtle; [SecureContext] readonly attribute SubtleCrypto subtle;
// FIXME: the argument and the return value should be of type ArrayBufferView // FIXME: the argument and the return value should be of type ArrayBufferView
any getRandomValues(any array); any getRandomValues(any array);
[SecureContext] DOMString randomUUID(); [SecureContext] DOMString randomUUID();
}; };

View file

@ -1,5 +1,21 @@
// https://w3c.github.io/webcrypto/#subtlecrypto-interface
[SecureContext,Exposed=(Window,Worker)] [SecureContext,Exposed=(Window,Worker)]
interface SubtleCrypto { interface SubtleCrypto {
// FIXME: Promise<any> encrypt(AlgorithmIdentifier algorithm, CryptoKey key, BufferSource data);
// FIXME: Promise<any> decrypt(AlgorithmIdentifier algorithm, CryptoKey key, BufferSource data);
// FIXME: Promise<any> sign(AlgorithmIdentifier algorithm, CryptoKey key, BufferSource data);
// FIXME: Promise<any> verify(AlgorithmIdentifier algorithm, CryptoKey key, BufferSource signature, BufferSource data);
// FIXME: Add support for AlgorithmIdentifier ("typedef (object or DOMString)") // FIXME: Add support for AlgorithmIdentifier ("typedef (object or DOMString)")
Promise<any> digest(DOMString algorithm, BufferSource data); Promise<any> digest(DOMString algorithm, BufferSource data);
// FIXME: Promise<any> generateKey(AlgorithmIdentifier algorithm, boolean extractable, sequence<KeyUsage> keyUsages);
// FIXME: Promise<any> deriveKey(AlgorithmIdentifier algorithm, CryptoKey baseKey, AlgorithmIdentifier derivedKeyType, boolean extractable, sequence<KeyUsage> keyUsages );
// FIXME: Promise<ArrayBuffer> deriveBits(AlgorithmIdentifier algorithm, CryptoKey baseKey, unsigned long length);
// FIXME: Promise<CryptoKey> importKey(KeyFormat format, (BufferSource or JsonWebKey) keyData, AlgorithmIdentifier algorithm, boolean extractable, sequence<KeyUsage> keyUsages);
// FIXME: Promise<any> exportKey(KeyFormat format, CryptoKey key);
// FIXME: Promise<any> wrapKey(KeyFormat format, CryptoKey key, CryptoKey wrappingKey, AlgorithmIdentifier wrapAlgorithm);
// FIXME: Promise<CryptoKey> unwrapKey(KeyFormat format, BufferSource wrappedKey, CryptoKey unwrappingKey, AlgorithmIdentifier unwrapAlgorithm, AlgorithmIdentifier unwrappedKeyAlgorithm, boolean extractable, sequence<KeyUsage> keyUsages);
}; };

View file

@ -1,5 +1,6 @@
#import <DOM/AbortSignal.idl> #import <DOM/AbortSignal.idl>
// https://dom.spec.whatwg.org/#interface-abortcontroller
[Exposed=(Window,Worker)] [Exposed=(Window,Worker)]
interface AbortController { interface AbortController {
constructor(); constructor();

View file

@ -1,9 +1,12 @@
#import <DOM/EventTarget.idl> #import <DOM/EventTarget.idl>
#import <DOM/EventHandler.idl> #import <DOM/EventHandler.idl>
// https://dom.spec.whatwg.org/#interface-AbortSignal
[Exposed=(Window,Worker), CustomVisit] [Exposed=(Window,Worker), CustomVisit]
interface AbortSignal : EventTarget { interface AbortSignal : EventTarget {
// FIXME: [NewObject] static AbortSignal abort(optional any reason); // FIXME: [NewObject] static AbortSignal abort(optional any reason);
// FIXME: [Exposed=(Window,Worker), NewObject] static AbortSignal timeout([EnforceRange] unsigned long long milliseconds);
// FIXME: [NewObject] static AbortSignal _any(sequence<AbortSignal> signals);
readonly attribute boolean aborted; readonly attribute boolean aborted;
readonly attribute any reason; readonly attribute any reason;

View file

@ -1,3 +1,4 @@
// https://dom.spec.whatwg.org/#interface-abstractrange
[Exposed=Window] [Exposed=Window]
interface AbstractRange { interface AbstractRange {
readonly attribute Node startContainer; readonly attribute Node startContainer;

View file

@ -1,6 +1,7 @@
#import <DOM/Node.idl> #import <DOM/Node.idl>
#import <DOM/Element.idl> #import <DOM/Element.idl>
// https://dom.spec.whatwg.org/#interface-attr
[Exposed=Window] [Exposed=Window]
interface Attr : Node { interface Attr : Node {
readonly attribute DOMString? namespaceURI; readonly attribute DOMString? namespaceURI;
@ -11,5 +12,5 @@ interface Attr : Node {
readonly attribute Element? ownerElement; readonly attribute Element? ownerElement;
readonly attribute boolean specified; readonly attribute boolean specified; // useless; always returns true
}; };

View file

@ -1,3 +1,4 @@
// https://dom.spec.whatwg.org/#interface-cdatasection
[Exposed=Window] [Exposed=Window]
interface CDATASection : Text { interface CDATASection : Text {
}; };

View file

@ -14,8 +14,9 @@ interface CharacterData : Node {
undefined deleteData(unsigned long offset, unsigned long count); undefined deleteData(unsigned long offset, unsigned long count);
undefined replaceData(unsigned long offset, unsigned long count, DOMString data); undefined replaceData(unsigned long offset, unsigned long count, DOMString data);
readonly attribute Element? nextElementSibling; // https://dom.spec.whatwg.org/#interface-nondocumenttypechildnode
readonly attribute Element? previousElementSibling; readonly attribute Element? previousElementSibling;
readonly attribute Element? nextElementSibling;
}; };
CharacterData includes ChildNode; CharacterData includes ChildNode;

View file

@ -1,5 +1,6 @@
#import <DOM/Event.idl> #import <DOM/Event.idl>
// https://dom.spec.whatwg.org/#interface-customevent
[Exposed=(Window,Worker)] [Exposed=(Window,Worker)]
interface CustomEvent : Event { interface CustomEvent : Event {
constructor(DOMString type, optional CustomEventInit eventInitDict = {}); constructor(DOMString type, optional CustomEventInit eventInitDict = {});

View file

@ -9,6 +9,7 @@
interface DocumentFragment : Node { interface DocumentFragment : Node {
constructor(); constructor();
// https://dom.spec.whatwg.org/#interface-nonelementparentnode
Element? getElementById(DOMString id); Element? getElementById(DOMString id);
}; };

View file

@ -8,7 +8,7 @@ interface Event {
readonly attribute DOMString type; readonly attribute DOMString type;
readonly attribute EventTarget? target; readonly attribute EventTarget? target;
readonly attribute EventTarget? srcElement; readonly attribute EventTarget? srcElement; // legacy
readonly attribute EventTarget? currentTarget; readonly attribute EventTarget? currentTarget;
sequence<EventTarget> composedPath(); sequence<EventTarget> composedPath();

View file

@ -1,5 +1,6 @@
#import <DOM/Element.idl> #import <DOM/Element.idl>
// https://dom.spec.whatwg.org/#interface-htmlcollection
[Exposed=Window, LegacyUnenumerableNamedProperties] [Exposed=Window, LegacyUnenumerableNamedProperties]
interface HTMLCollection { interface HTMLCollection {

View file

@ -1,6 +1,7 @@
#import <DOM/MutationRecord.idl> #import <DOM/MutationRecord.idl>
#import <DOM/Node.idl> #import <DOM/Node.idl>
// https://dom.spec.whatwg.org/#interface-mutationobserver
[Exposed=Window] [Exposed=Window]
interface MutationObserver { interface MutationObserver {

View file

@ -1,6 +1,7 @@
#import <DOM/Node.idl> #import <DOM/Node.idl>
#import <DOM/NodeList.idl> #import <DOM/NodeList.idl>
// https://dom.spec.whatwg.org/#interface-mutationrecord
[Exposed=Window] [Exposed=Window]
interface MutationRecord { interface MutationRecord {

View file

@ -1,5 +1,6 @@
#import <DOM/Attr.idl> #import <DOM/Attr.idl>
// https://dom.spec.whatwg.org/#interface-namednodemap
[Exposed=Window, LegacyUnenumerableNamedProperties] [Exposed=Window, LegacyUnenumerableNamedProperties]
interface NamedNodeMap { interface NamedNodeMap {
readonly attribute unsigned long length; readonly attribute unsigned long length;

View file

@ -1,6 +1,7 @@
#import <DOM/Node.idl> #import <DOM/Node.idl>
#import <DOM/NodeFilter.idl> #import <DOM/NodeFilter.idl>
// https://dom.spec.whatwg.org/#interface-nodeiterator
[Exposed=Window] [Exposed=Window]
interface NodeIterator { interface NodeIterator {

View file

@ -1,5 +1,6 @@
#import <DOM/Node.idl> #import <DOM/Node.idl>
// https://dom.spec.whatwg.org/#interface-nodelist
[Exposed=Window] [Exposed=Window]
interface NodeList { interface NodeList {
getter Node? item(unsigned long index); getter Node? item(unsigned long index);

View file

@ -2,6 +2,7 @@
#import <DOM/AbstractRange.idl> #import <DOM/AbstractRange.idl>
#import <Geometry/DOMRect.idl> #import <Geometry/DOMRect.idl>
// https://dom.spec.whatwg.org/#interface-range
[Exposed=Window] [Exposed=Window]
interface Range : AbstractRange { interface Range : AbstractRange {

View file

@ -1,6 +1,7 @@
#import <DOM/Node.idl> #import <DOM/Node.idl>
#import <DOM/AbstractRange.idl> #import <DOM/AbstractRange.idl>
// https://dom.spec.whatwg.org/#staticrange
[Exposed=Window] [Exposed=Window]
interface StaticRange : AbstractRange { interface StaticRange : AbstractRange {
constructor(StaticRangeInit init); constructor(StaticRangeInit init);

View file

@ -1,6 +1,7 @@
#import <DOM/Node.idl> #import <DOM/Node.idl>
#import <DOM/NodeFilter.idl> #import <DOM/NodeFilter.idl>
// https://dom.spec.whatwg.org/#interface-treewalker
[Exposed=Window] [Exposed=Window]
interface TreeWalker { interface TreeWalker {

View file

@ -1,5 +1,6 @@
#import <DOM/Document.idl> #import <DOM/Document.idl>
// https://dom.spec.whatwg.org/#xmldocument
[Exposed=Window] [Exposed=Window]
interface XMLDocument : Document { interface XMLDocument : Document {
}; };

View file

@ -1,5 +1,6 @@
#import <DOM/Node.idl> #import <DOM/Node.idl>
// https://w3c.github.io/DOM-Parsing/#the-xmlserializer-interface
[Exposed=Window] [Exposed=Window]
interface XMLSerializer { interface XMLSerializer {
constructor(); constructor();

View file

@ -1,5 +1,7 @@
// https://fetch.spec.whatwg.org/#typedefdef-headersinit
typedef (sequence<sequence<ByteString>> or record<ByteString, ByteString>) HeadersInit; typedef (sequence<sequence<ByteString>> or record<ByteString, ByteString>) HeadersInit;
// https://fetch.spec.whatwg.org/#headers
[Exposed=(Window,Worker)] [Exposed=(Window,Worker)]
interface Headers { interface Headers {
constructor(optional HeadersInit init); constructor(optional HeadersInit init);

View file

@ -2,6 +2,7 @@
#import <Fetch/BodyInit.idl> #import <Fetch/BodyInit.idl>
#import <Fetch/Headers.idl> #import <Fetch/Headers.idl>
// https://fetch.spec.whatwg.org/#response-class
[Exposed=(Window,Worker)] [Exposed=(Window,Worker)]
interface Response { interface Response {
constructor(optional BodyInit? body = null, optional ResponseInit init = {}); constructor(optional BodyInit? body = null, optional ResponseInit init = {});

View file

@ -1,3 +1,4 @@
// https://w3c.github.io/FileAPI/#blob-section
[Exposed=(Window,Worker), Serializable] [Exposed=(Window,Worker), Serializable]
interface Blob { interface Blob {
constructor(optional sequence<BlobPart> blobParts, optional BlobPropertyBag options = {}); constructor(optional sequence<BlobPart> blobParts, optional BlobPropertyBag options = {});

View file

@ -1,5 +1,6 @@
#import <FileAPI/Blob.idl> #import <FileAPI/Blob.idl>
// https://w3c.github.io/FileAPI/#file-section
[Exposed=(Window,Worker), Serializable] [Exposed=(Window,Worker), Serializable]
interface File : Blob { interface File : Blob {
constructor(sequence<BlobPart> fileBits, USVString fileName, optional FilePropertyBag options = {}); constructor(sequence<BlobPart> fileBits, USVString fileName, optional FilePropertyBag options = {});

View file

@ -1,5 +1,6 @@
// https://w3c.github.io/FileAPI/#filelist-section
[Exposed=(Window,Worker), Serializable] [Exposed=(Window,Worker), Serializable]
interface FileList { interface FileList {
getter File? item(unsigned long index); getter File? item(unsigned long index);
readonly attribute unsigned long length; readonly attribute unsigned long length;
}; };

View file

@ -1,6 +1,6 @@
// https://html.spec.whatwg.org/multipage/canvas.html#canvascompositing // https://html.spec.whatwg.org/multipage/canvas.html#canvascompositing
interface mixin CanvasCompositing { interface mixin CanvasCompositing {
// compositing // compositing
attribute unrestricted double globalAlpha; // (default 1.0) attribute unrestricted double globalAlpha; // (default 1.0)
// FIXME: attribute DOMString globalCompositeOperation; // (default "source-over") // FIXME: attribute DOMString globalCompositeOperation; // (default "source-over")
}; };

View file

@ -1,5 +1,5 @@
[Exposed=(Window,Worker)] [Exposed=(Window,Worker)]
interface CanvasPattern { interface CanvasPattern {
// opaque object // opaque object
// FIXME: undefined setTransform(optional DOMMatrix2DInit transform = {}); // FIXME: undefined setTransform(optional DOMMatrix2DInit transform = {});
}; };

View file

@ -5,14 +5,14 @@
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#the-navigationcurrententrychangeevent-interface // https://html.spec.whatwg.org/multipage/nav-history-apis.html#the-navigationcurrententrychangeevent-interface
[Exposed=Window] [Exposed=Window]
interface NavigationCurrentEntryChangeEvent : Event { interface NavigationCurrentEntryChangeEvent : Event {
constructor(DOMString type, NavigationCurrentEntryChangeEventInit eventInitDict); constructor(DOMString type, NavigationCurrentEntryChangeEventInit eventInitDict);
readonly attribute NavigationType? navigationType; readonly attribute NavigationType? navigationType;
readonly attribute NavigationHistoryEntry from; readonly attribute NavigationHistoryEntry from;
}; };
dictionary NavigationCurrentEntryChangeEventInit : EventInit { dictionary NavigationCurrentEntryChangeEventInit : EventInit {
// FIXME: Set default value of null when IDL generator supports it // FIXME: Set default value of null when IDL generator supports it
NavigationType? navigationType; NavigationType? navigationType;
required NavigationHistoryEntry from; required NavigationHistoryEntry from;
}; };

View file

@ -1,7 +1,7 @@
// https://html.spec.whatwg.org/multipage/system-state.html#navigatorlanguage // https://html.spec.whatwg.org/multipage/system-state.html#navigatorlanguage
interface mixin NavigatorLanguage { interface mixin NavigatorLanguage {
readonly attribute DOMString language; readonly attribute DOMString language;
// FIXME: readonly attribute FrozenArray<DOMString> languages; // FIXME: readonly attribute FrozenArray<DOMString> languages;
// This is supposed to be a FrozenArray that always returns the same object // This is supposed to be a FrozenArray that always returns the same object
readonly attribute sequence<DOMString> languages; readonly attribute sequence<DOMString> languages;
}; };

View file

@ -1,19 +1,19 @@
// https://html.spec.whatwg.org/multipage/canvas.html#textmetrics // https://html.spec.whatwg.org/multipage/canvas.html#textmetrics
[Exposed=Window] [Exposed=Window]
interface TextMetrics { interface TextMetrics {
// x-direction // x-direction
readonly attribute double width; // advance width readonly attribute double width; // advance width
readonly attribute double actualBoundingBoxLeft; readonly attribute double actualBoundingBoxLeft;
readonly attribute double actualBoundingBoxRight; readonly attribute double actualBoundingBoxRight;
// y-direction // y-direction
readonly attribute double fontBoundingBoxAscent; readonly attribute double fontBoundingBoxAscent;
readonly attribute double fontBoundingBoxDescent; readonly attribute double fontBoundingBoxDescent;
readonly attribute double actualBoundingBoxAscent; readonly attribute double actualBoundingBoxAscent;
readonly attribute double actualBoundingBoxDescent; readonly attribute double actualBoundingBoxDescent;
readonly attribute double emHeightAscent; readonly attribute double emHeightAscent;
readonly attribute double emHeightDescent; readonly attribute double emHeightDescent;
readonly attribute double hangingBaseline; readonly attribute double hangingBaseline;
readonly attribute double alphabeticBaseline; readonly attribute double alphabeticBaseline;
readonly attribute double ideographicBaseline; readonly attribute double ideographicBaseline;
}; };

View file

@ -3,8 +3,10 @@
#import <DOM/Node.idl> #import <DOM/Node.idl>
#import <IntersectionObserver/IntersectionObserverEntry.idl> #import <IntersectionObserver/IntersectionObserverEntry.idl>
// https://w3c.github.io/IntersectionObserver/#intersection-observer-callback
callback IntersectionObserverCallback = undefined (sequence<IntersectionObserverEntry> entries, IntersectionObserver observer); callback IntersectionObserverCallback = undefined (sequence<IntersectionObserverEntry> entries, IntersectionObserver observer);
// https://w3c.github.io/IntersectionObserver/#intersection-observer-interface
[Exposed=(Window)] [Exposed=(Window)]
interface IntersectionObserver { interface IntersectionObserver {
constructor(IntersectionObserverCallback callback, optional IntersectionObserverInit options = {}); constructor(IntersectionObserverCallback callback, optional IntersectionObserverInit options = {});
@ -18,8 +20,10 @@ interface IntersectionObserver {
sequence<IntersectionObserverEntry> takeRecords(); sequence<IntersectionObserverEntry> takeRecords();
}; };
// https://w3c.github.io/IntersectionObserver/#intersection-observer-init
dictionary IntersectionObserverInit { dictionary IntersectionObserverInit {
(Element or Document)? root = null; (Element or Document)? root = null;
DOMString rootMargin = "0px"; DOMString rootMargin = "0px";
// FIXME: DOMString scrollMargin = "0px";
(double or sequence<double>) threshold = 0; (double or sequence<double>) threshold = 0;
}; };

View file

@ -24,5 +24,6 @@ interface PerformanceTiming {
readonly attribute unsigned long long domComplete; readonly attribute unsigned long long domComplete;
readonly attribute unsigned long long loadEventStart; readonly attribute unsigned long long loadEventStart;
readonly attribute unsigned long long loadEventEnd; readonly attribute unsigned long long loadEventEnd;
[Default] object toJSON();
}; };

View file

@ -1,5 +1,6 @@
#import <DOM/Element.idl> #import <DOM/Element.idl>
// https://drafts.csswg.org/resize-observer/#resize-observer-interface
[Exposed=(Window)] [Exposed=(Window)]
interface ResizeObserver { interface ResizeObserver {
@ -10,8 +11,6 @@ interface ResizeObserver {
}; };
callback ResizeObserverCallback = void (sequence<ResizeObserverEntry> entries, ResizeObserver observer);
enum ResizeObserverBoxOptions { enum ResizeObserverBoxOptions {
"border-box", "content-box", "device-pixel-content-box" "border-box", "content-box", "device-pixel-content-box"
}; };
@ -19,3 +18,6 @@ enum ResizeObserverBoxOptions {
dictionary ResizeObserverOptions { dictionary ResizeObserverOptions {
ResizeObserverBoxOptions box = "content-box"; ResizeObserverBoxOptions box = "content-box";
}; };
// https://drafts.csswg.org/resize-observer/#resize-observer-callback
callback ResizeObserverCallback = void (sequence<ResizeObserverEntry> entries, ResizeObserver observer);

View file

@ -3,15 +3,16 @@
[Exposed=Window] [Exposed=Window]
interface SVGGradientElement : SVGElement { interface SVGGradientElement : SVGElement {
// Spread Method Types // Spread Method Types
const unsigned short SVG_SPREADMETHOD_UNKNOWN = 0; const unsigned short SVG_SPREADMETHOD_UNKNOWN = 0;
const unsigned short SVG_SPREADMETHOD_PAD = 1; const unsigned short SVG_SPREADMETHOD_PAD = 1;
const unsigned short SVG_SPREADMETHOD_REFLECT = 2; const unsigned short SVG_SPREADMETHOD_REFLECT = 2;
const unsigned short SVG_SPREADMETHOD_REPEAT = 3; const unsigned short SVG_SPREADMETHOD_REPEAT = 3;
// FIXME: [SameObject] readonly attribute SVGAnimatedEnumeration gradientUnits;
// FIXME: [SameObject] readonly attribute SVGAnimatedTransformList gradientTransform;
// FIXME: [SameObject] readonly attribute SVGAnimatedEnumeration spreadMethod;
// FIXME: [SameObject] readonly attribute SVGAnimatedEnumeration gradientUnits;
// FIXME: [SameObject] readonly attribute SVGAnimatedTransformList gradientTransform;
// FIXME: [SameObject] readonly attribute SVGAnimatedEnumeration spreadMethod;
}; };
// FIXME: SVGGradientElement includes SVGURIReference; // FIXME: SVGGradientElement includes SVGURIReference;

View file

@ -4,21 +4,22 @@
[Exposed=Window] [Exposed=Window]
interface SVGTextContentElement : SVGGraphicsElement { interface SVGTextContentElement : SVGGraphicsElement {
// lengthAdjust Types // lengthAdjust Types
const unsigned short LENGTHADJUST_UNKNOWN = 0; const unsigned short LENGTHADJUST_UNKNOWN = 0;
const unsigned short LENGTHADJUST_SPACING = 1; const unsigned short LENGTHADJUST_SPACING = 1;
const unsigned short LENGTHADJUST_SPACINGANDGLYPHS = 2; const unsigned short LENGTHADJUST_SPACINGANDGLYPHS = 2;
// FIXME: [SameObject] readonly attribute SVGAnimatedLength textLength; // FIXME: [SameObject] readonly attribute SVGAnimatedLength textLength;
// FIXME:[SameObject] readonly attribute SVGAnimatedEnumeration lengthAdjust; // FIXME:[SameObject] readonly attribute SVGAnimatedEnumeration lengthAdjust;
long getNumberOfChars();
// FIXME: float getComputedTextLength();
// FIXME: float getSubStringLength(unsigned long charnum, unsigned long nchars);
// FIXME: DOMPoint getStartPositionOfChar(unsigned long charnum);
// FIXME: DOMPoint getEndPositionOfChar(unsigned long charnum);
// FIXME: DOMRect getExtentOfChar(unsigned long charnum);
// FIXME: float getRotationOfChar(unsigned long charnum);
// FIXME: long getCharNumAtPosition(optional DOMPointInit point = {});
// FIXME: undefined selectSubString(unsigned long charnum, unsigned long nchars);
long getNumberOfChars();
// FIXME: float getComputedTextLength();
// FIXME: float getSubStringLength(unsigned long charnum, unsigned long nchars);
// FIXME: DOMPoint getStartPositionOfChar(unsigned long charnum);
// FIXME: DOMPoint getEndPositionOfChar(unsigned long charnum);
// FIXME: DOMRect getExtentOfChar(unsigned long charnum);
// FIXME: float getRotationOfChar(unsigned long charnum);
// FIXME: long getCharNumAtPosition(optional DOMPointInit point = {});
// FIXME: undefined selectSubString(unsigned long charnum, unsigned long nchars);
}; };

View file

@ -3,9 +3,9 @@
// https://svgwg.org/svg2-draft/text.html#InterfaceSVGTextPositioningElement // https://svgwg.org/svg2-draft/text.html#InterfaceSVGTextPositioningElement
[Exposed=Window] [Exposed=Window]
interface SVGTextPositioningElement : SVGTextContentElement { interface SVGTextPositioningElement : SVGTextContentElement {
// FIXME: [SameObject] readonly attribute SVGAnimatedLengthList x; // FIXME: [SameObject] readonly attribute SVGAnimatedLengthList x;
// FIXME: [SameObject] readonly attribute SVGAnimatedLengthList y; // FIXME: [SameObject] readonly attribute SVGAnimatedLengthList y;
// FIXME: [SameObject] readonly attribute SVGAnimatedLengthList dx; // FIXME: [SameObject] readonly attribute SVGAnimatedLengthList dx;
// FIXME: [SameObject] readonly attribute SVGAnimatedLengthList dy; // FIXME: [SameObject] readonly attribute SVGAnimatedLengthList dy;
// FIXME: [SameObject] readonly attribute SVGAnimatedNumberList rotate; // FIXME: [SameObject] readonly attribute SVGAnimatedNumberList rotate;
}; };

View file

@ -1,6 +1,7 @@
#import <DOM/Node.idl> #import <DOM/Node.idl>
#import <DOM/Range.idl> #import <DOM/Range.idl>
// https://w3c.github.io/selection-api/#selection-interface
[Exposed=Window] [Exposed=Window]
interface Selection { interface Selection {

View file

@ -7,6 +7,5 @@ interface ByteLengthQueuingStrategy {
constructor(QueuingStrategyInit init); constructor(QueuingStrategyInit init);
readonly attribute unrestricted double highWaterMark; readonly attribute unrestricted double highWaterMark;
readonly attribute Function size; readonly attribute Function size;
}; };

View file

@ -7,6 +7,5 @@ interface CountQueuingStrategy {
constructor(QueuingStrategyInit init); constructor(QueuingStrategyInit init);
readonly attribute unrestricted double highWaterMark; readonly attribute unrestricted double highWaterMark;
readonly attribute Function size; readonly attribute Function size;
}; };

View file

@ -1,5 +1,6 @@
#import <Streams/ReadableStreamBYOBRequest.idl> #import <Streams/ReadableStreamBYOBRequest.idl>
// https://streams.spec.whatwg.org/#rbs-controller-class-definition
[Exposed=*] [Exposed=*]
interface ReadableByteStreamController { interface ReadableByteStreamController {
readonly attribute ReadableStreamBYOBRequest? byobRequest; readonly attribute ReadableStreamBYOBRequest? byobRequest;
@ -7,7 +8,5 @@ interface ReadableByteStreamController {
undefined close(); undefined close();
undefined error(optional any e); undefined error(optional any e);
// FIXME: undefined enqueue(ArrayBufferView chunk);
// FIXME: Implement
// undefined enqueue(ArrayBufferView chunk);
}; };

View file

@ -15,10 +15,17 @@ dictionary ReadableStreamGetReaderOptions {
interface ReadableStream { interface ReadableStream {
constructor(optional object underlyingSource, optional QueuingStrategy strategy = {}); constructor(optional object underlyingSource, optional QueuingStrategy strategy = {});
// FIXME: static ReadableStream from(any asyncIterable);
readonly attribute boolean locked; readonly attribute boolean locked;
Promise<undefined> cancel(optional any reason); Promise<undefined> cancel(optional any reason);
ReadableStreamReader getReader(optional ReadableStreamGetReaderOptions options = {}); ReadableStreamReader getReader(optional ReadableStreamGetReaderOptions options = {});
// FIXME: ReadableStream pipeThrough(ReadableWritablePair transform, optional StreamPipeOptions options = {});
// FIXME: Promise<undefined> pipeTo(WritableStream destination, optional StreamPipeOptions options = {});
// FIXME: sequence<ReadableStream> tee();
// FIXME: async iterable<any>(optional ReadableStreamIteratorOptions options = {});
}; };
typedef (ReadableStreamDefaultReader or ReadableStreamBYOBReader) ReadableStreamReader; typedef (ReadableStreamDefaultReader or ReadableStreamBYOBReader) ReadableStreamReader;

View file

@ -6,8 +6,7 @@
interface ReadableStreamBYOBReader { interface ReadableStreamBYOBReader {
constructor(ReadableStream stream); constructor(ReadableStream stream);
// FIXME: Implement // FIXME: Promise<ReadableStreamReadResult> read(ArrayBufferView view);
// Promise<ReadableStreamReadResult> read(ArrayBufferView view);
undefined releaseLock(); undefined releaseLock();
}; };
ReadableStreamBYOBReader includes ReadableStreamGenericReader; ReadableStreamBYOBReader includes ReadableStreamGenericReader;

View file

@ -1,9 +1,9 @@
// https://streams.spec.whatwg.org/#readablestreambyobrequest
[Exposed=*] [Exposed=*]
interface ReadableStreamBYOBRequest { interface ReadableStreamBYOBRequest {
// FIXME: This should be an ArrayBufferView // FIXME: This should be an ArrayBufferView
readonly attribute any? view; readonly attribute any? view;
// FIXME: Implement // FIXME: undefined respond([EnforceRange] unsigned long long bytesWritten);
// undefined respond([EnforceRange] unsigned long long bytesWritten); // FIXME: undefined respondWithNewView(ArrayBufferView view);
// undefined respondWithNewView(ArrayBufferView view);
}; };

View file

@ -1,6 +1,7 @@
#import <Streams/QueuingStrategy.idl> #import <Streams/QueuingStrategy.idl>
#import <Streams/WritableStreamDefaultWriter.idl> #import <Streams/WritableStreamDefaultWriter.idl>
// https://streams.spec.whatwg.org/#writablestream
[Exposed=*, Transferable] [Exposed=*, Transferable]
interface WritableStream { interface WritableStream {
constructor(optional object underlyingSink, optional QueuingStrategy strategy = {}); constructor(optional object underlyingSink, optional QueuingStrategy strategy = {});

View file

@ -1,5 +1,6 @@
#import <DOM/AbortSignal.idl> #import <DOM/AbortSignal.idl>
// https://streams.spec.whatwg.org/#writablestreamdefaultcontroller
[Exposed=*] [Exposed=*]
interface WritableStreamDefaultController { interface WritableStreamDefaultController {
readonly attribute AbortSignal signal; readonly attribute AbortSignal signal;

View file

@ -1,5 +1,6 @@
#import <Streams/WritableStream.idl> #import <Streams/WritableStream.idl>
// https://streams.spec.whatwg.org/#writablestreamdefaultwriter
[Exposed=*] [Exposed=*]
interface WritableStreamDefaultWriter { interface WritableStreamDefaultWriter {
constructor(WritableStream stream); constructor(WritableStream stream);

View file

@ -1,5 +1,6 @@
#import <UIEvents/UIEvent.idl> #import <UIEvents/UIEvent.idl>
// https://www.w3.org/TR/uievents/#idl-focusevent
[Exposed=Window] [Exposed=Window]
interface FocusEvent : UIEvent { interface FocusEvent : UIEvent {
@ -8,6 +9,7 @@ interface FocusEvent : UIEvent {
}; };
// https://www.w3.org/TR/uievents/#idl-focuseventinit
dictionary FocusEventInit : UIEventInit { dictionary FocusEventInit : UIEventInit {
EventTarget? relatedTarget = null; EventTarget? relatedTarget = null;

View file

@ -7,12 +7,12 @@ interface UIEvent : Event {
readonly attribute Window? view; readonly attribute Window? view;
readonly attribute long detail; readonly attribute long detail;
// NOTE: This is "deprecated, but supported for backwards-compatibility with widely-deployed implementations." // Obsolete
[ImplementedAs=init_ui_event] undefined initUIEvent(DOMString typeArg, optional boolean bubblesArg = false, optional boolean cancelableArg = false, optional Window? viewArg = null, optional long detailArg = 0); [ImplementedAs=init_ui_event] undefined initUIEvent(DOMString typeArg, optional boolean bubblesArg = false, optional boolean cancelableArg = false, optional Window? viewArg = null, optional long detailArg = 0);
readonly attribute unsigned long which; readonly attribute unsigned long which;
}; };
// https://w3c.github.io/uievents/#idl-uieventinit
dictionary UIEventInit : EventInit { dictionary UIEventInit : EventInit {
Window? view = null; Window? view = null;
long detail = 0; long detail = 0;

View file

@ -14,6 +14,7 @@ interface WheelEvent : MouseEvent {
readonly attribute unsigned long deltaMode; readonly attribute unsigned long deltaMode;
}; };
// https://www.w3.org/TR/uievents/#idl-wheeleventinit
dictionary WheelEventInit : MouseEventInit { dictionary WheelEventInit : MouseEventInit {
double deltaX = 0; double deltaX = 0;
double deltaY = 0; double deltaY = 0;

View file

@ -2,19 +2,20 @@
[Exposed=*] [Exposed=*]
interface URLSearchParams { interface URLSearchParams {
constructor(optional (sequence<sequence<USVString>> or record<USVString, USVString> or USVString) init = ""); constructor(optional (sequence<sequence<USVString>> or record<USVString, USVString> or USVString) init = "");
readonly attribute unsigned long size; readonly attribute unsigned long size;
undefined append(USVString name, USVString value); undefined append(USVString name, USVString value);
undefined delete(USVString name); undefined delete(USVString name);
USVString? get(USVString name); USVString? get(USVString name);
sequence<USVString> getAll(USVString name); sequence<USVString> getAll(USVString name);
boolean has(USVString name); boolean has(USVString name);
undefined set(USVString name, USVString value); undefined set(USVString name, USVString value);
undefined sort(); undefined sort();
iterable<USVString, USVString>;
stringifier;
iterable<USVString, USVString>;
stringifier;
}; };

View file

@ -1,10 +1,12 @@
#import <PerformanceTimeline/PerformanceEntry.idl> #import <PerformanceTimeline/PerformanceEntry.idl>
// https://w3c.github.io/user-timing/#performancemeasure
[Exposed=(Window,Worker)] [Exposed=(Window,Worker)]
interface PerformanceMeasure : PerformanceEntry { interface PerformanceMeasure : PerformanceEntry {
readonly attribute any detail; readonly attribute any detail;
}; };
// https://w3c.github.io/user-timing/#extensions-performance-interface
dictionary PerformanceMeasureOptions { dictionary PerformanceMeasureOptions {
any detail; any detail;
(DOMString or DOMHighResTimeStamp) start; (DOMString or DOMHighResTimeStamp) start;

View file

@ -20,12 +20,12 @@ interface AudioContext : BaseAudioContext {
}; };
dictionary AudioContextOptions { dictionary AudioContextOptions {
AudioContextLatencyCategory latencyHint = "interactive"; AudioContextLatencyCategory latencyHint = "interactive";
float sampleRate; float sampleRate;
}; };
dictionary AudioTimestamp { dictionary AudioTimestamp {
double contextTime; double contextTime;
// FIXME: Should be DOMHighResTimeStamp, but DOMHighResTimeStamp doesn't get parsed as a double during codegen // FIXME: Should be DOMHighResTimeStamp, but DOMHighResTimeStamp doesn't get parsed as a double during codegen
double performanceTime; double performanceTime;
}; };

View file

@ -9,13 +9,15 @@ interface WebSocket : EventTarget {
readonly attribute USVString url; readonly attribute USVString url;
// ready state
const unsigned short CONNECTING = 0; const unsigned short CONNECTING = 0;
const unsigned short OPEN = 1; const unsigned short OPEN = 1;
const unsigned short CLOSING = 2; const unsigned short CLOSING = 2;
const unsigned short CLOSED = 3; const unsigned short CLOSED = 3;
readonly attribute unsigned short readyState; readonly attribute unsigned short readyState;
// readonly attribute unsigned long long bufferedAmount; // FIXME: readonly attribute unsigned long long bufferedAmount;
// networking
attribute EventHandler onopen; attribute EventHandler onopen;
attribute EventHandler onerror; attribute EventHandler onerror;
attribute EventHandler onclose; attribute EventHandler onclose;
@ -23,6 +25,7 @@ interface WebSocket : EventTarget {
readonly attribute DOMString protocol; readonly attribute DOMString protocol;
undefined close(optional unsigned short code, optional USVString reason); undefined close(optional unsigned short code, optional USVString reason);
// messaging
attribute EventHandler onmessage; attribute EventHandler onmessage;
attribute DOMString binaryType; attribute DOMString binaryType;
undefined send((BufferSource or Blob or USVString) data); undefined send((BufferSource or Blob or USVString) data);

View file

@ -5,12 +5,12 @@
#import <XHR/XMLHttpRequestUpload.idl> #import <XHR/XMLHttpRequestUpload.idl>
enum XMLHttpRequestResponseType { enum XMLHttpRequestResponseType {
"", "",
"arraybuffer", "arraybuffer",
"blob", "blob",
"document", "document",
"json", "json",
"text" "text"
}; };
// https://xhr.spec.whatwg.org/#xmlhttprequest // https://xhr.spec.whatwg.org/#xmlhttprequest
@ -19,33 +19,37 @@ interface XMLHttpRequest : XMLHttpRequestEventTarget {
constructor(); constructor();
// event handler
attribute EventHandler onreadystatechange;
// states
const unsigned short UNSENT = 0; const unsigned short UNSENT = 0;
const unsigned short OPENED = 1; const unsigned short OPENED = 1;
const unsigned short HEADERS_RECEIVED = 2; const unsigned short HEADERS_RECEIVED = 2;
const unsigned short LOADING = 3; const unsigned short LOADING = 3;
const unsigned short DONE = 4; const unsigned short DONE = 4;
readonly attribute unsigned short readyState; readonly attribute unsigned short readyState;
readonly attribute unsigned short status;
readonly attribute ByteString statusText;
readonly attribute DOMString responseText;
readonly attribute Document? responseXML;
readonly attribute any response;
attribute XMLHttpRequestResponseType responseType;
attribute unsigned long timeout;
attribute boolean withCredentials;
[SameObject] readonly attribute XMLHttpRequestUpload upload;
// request
undefined open(DOMString method, DOMString url); undefined open(DOMString method, DOMString url);
undefined open(ByteString method, USVString url, boolean async, optional USVString? username = null, optional USVString? password = null); undefined open(ByteString method, USVString url, boolean async, optional USVString? username = null, optional USVString? password = null);
undefined setRequestHeader(DOMString name, DOMString value); undefined setRequestHeader(DOMString name, DOMString value);
attribute unsigned long timeout;
attribute boolean withCredentials;
[SameObject] readonly attribute XMLHttpRequestUpload upload;
undefined send(optional (Document or XMLHttpRequestBodyInit)? body = null); undefined send(optional (Document or XMLHttpRequestBodyInit)? body = null);
undefined abort(); undefined abort();
// response
// FIXME: readonly attribute USVString responseURL;
readonly attribute unsigned short status;
readonly attribute ByteString statusText;
ByteString? getResponseHeader(ByteString name); ByteString? getResponseHeader(ByteString name);
ByteString getAllResponseHeaders(); ByteString getAllResponseHeaders();
undefined overrideMimeType(DOMString mime); undefined overrideMimeType(DOMString mime);
attribute XMLHttpRequestResponseType responseType;
attribute EventHandler onreadystatechange; readonly attribute any response;
readonly attribute DOMString responseText;
readonly attribute Document? responseXML;
}; };

View file

@ -5,6 +5,7 @@
[Exposed=(Window,DedicatedWorker,SharedWorker)] [Exposed=(Window,DedicatedWorker,SharedWorker)]
interface XMLHttpRequestEventTarget : EventTarget { interface XMLHttpRequestEventTarget : EventTarget {
// event handlers
attribute EventHandler onloadstart; attribute EventHandler onloadstart;
attribute EventHandler onprogress; attribute EventHandler onprogress;
attribute EventHandler onabort; attribute EventHandler onabort;