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
Notes: sideshowbarker 2024-07-17 03:16:02 +09:00
75 changed files with 233 additions and 129 deletions

View File

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

View File

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

View File

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

View File

@ -2,9 +2,12 @@
#import <CSS/CSSStyleSheet.idl>
#import <CSS/MediaList.idl>
// https://drafts.csswg.org/cssom/#the-cssimportrule-interface
[Exposed=Window]
interface CSSImportRule : CSSRule {
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;
// FIXME: readonly attribute CSSOMString? layerName;
// FIXME: readonly attribute CSSOMString? supportsText;
};

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -4,9 +4,24 @@
// https://drafts.csswg.org/cssom/#cssstylesheet
[Exposed=Window]
interface CSSStyleSheet : StyleSheet {
// readonly attribute CSSRule? ownerRule;
// FIXME: constructor(optional CSSStyleSheetInit options = {});
// FIXME: readonly attribute CSSRule? ownerRule;
[SameObject] readonly attribute CSSRuleList cssRules;
unsigned long insertRule(CSSOMString rule, optional unsigned long index = 0);
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);
};
dictionary CSSStyleSheetInit {
DOMString baseURL = null;
(MediaList or DOMString) media = "";
boolean disabled = false;
};

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,11 +1,12 @@
#import <Crypto/SubtleCrypto.idl>
// https://w3c.github.io/webcrypto/#crypto-interface
[Exposed=(Window,Worker)]
interface Crypto {
[SecureContext] readonly attribute SubtleCrypto subtle;
[SecureContext] readonly attribute SubtleCrypto subtle;
// FIXME: the argument and the return value should be of type ArrayBufferView
any getRandomValues(any array);
// FIXME: the argument and the return value should be of type ArrayBufferView
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)]
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)")
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>
// https://dom.spec.whatwg.org/#interface-abortcontroller
[Exposed=(Window,Worker)]
interface AbortController {
constructor();

View File

@ -1,9 +1,12 @@
#import <DOM/EventTarget.idl>
#import <DOM/EventHandler.idl>
// https://dom.spec.whatwg.org/#interface-AbortSignal
[Exposed=(Window,Worker), CustomVisit]
interface AbortSignal : EventTarget {
// 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 any reason;

View File

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

View File

@ -1,6 +1,7 @@
#import <DOM/Node.idl>
#import <DOM/Element.idl>
// https://dom.spec.whatwg.org/#interface-attr
[Exposed=Window]
interface Attr : Node {
readonly attribute DOMString? namespaceURI;
@ -11,5 +12,5 @@ interface Attr : Node {
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]
interface CDATASection : Text {
};

View File

@ -14,8 +14,9 @@ interface CharacterData : Node {
undefined deleteData(unsigned long offset, unsigned long count);
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? nextElementSibling;
};
CharacterData includes ChildNode;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,6 +2,7 @@
#import <Fetch/BodyInit.idl>
#import <Fetch/Headers.idl>
// https://fetch.spec.whatwg.org/#response-class
[Exposed=(Window,Worker)]
interface Response {
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]
interface Blob {
constructor(optional sequence<BlobPart> blobParts, optional BlobPropertyBag options = {});

View File

@ -1,5 +1,6 @@
#import <FileAPI/Blob.idl>
// https://w3c.github.io/FileAPI/#file-section
[Exposed=(Window,Worker), Serializable]
interface File : Blob {
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]
interface FileList {
getter File? item(unsigned long index);
readonly attribute unsigned long length;
getter File? item(unsigned long index);
readonly attribute unsigned long length;
};

View File

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

View File

@ -1,5 +1,5 @@
[Exposed=(Window,Worker)]
interface CanvasPattern {
// opaque object
// FIXME: undefined setTransform(optional DOMMatrix2DInit transform = {});
// opaque object
// 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
[Exposed=Window]
interface NavigationCurrentEntryChangeEvent : Event {
constructor(DOMString type, NavigationCurrentEntryChangeEventInit eventInitDict);
constructor(DOMString type, NavigationCurrentEntryChangeEventInit eventInitDict);
readonly attribute NavigationType? navigationType;
readonly attribute NavigationHistoryEntry from;
readonly attribute NavigationType? navigationType;
readonly attribute NavigationHistoryEntry from;
};
dictionary NavigationCurrentEntryChangeEventInit : EventInit {
// FIXME: Set default value of null when IDL generator supports it
NavigationType? navigationType;
required NavigationHistoryEntry from;
// FIXME: Set default value of null when IDL generator supports it
NavigationType? navigationType;
required NavigationHistoryEntry from;
};

View File

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

View File

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

View File

@ -3,8 +3,10 @@
#import <DOM/Node.idl>
#import <IntersectionObserver/IntersectionObserverEntry.idl>
// https://w3c.github.io/IntersectionObserver/#intersection-observer-callback
callback IntersectionObserverCallback = undefined (sequence<IntersectionObserverEntry> entries, IntersectionObserver observer);
// https://w3c.github.io/IntersectionObserver/#intersection-observer-interface
[Exposed=(Window)]
interface IntersectionObserver {
constructor(IntersectionObserverCallback callback, optional IntersectionObserverInit options = {});
@ -18,8 +20,10 @@ interface IntersectionObserver {
sequence<IntersectionObserverEntry> takeRecords();
};
// https://w3c.github.io/IntersectionObserver/#intersection-observer-init
dictionary IntersectionObserverInit {
(Element or Document)? root = null;
DOMString rootMargin = "0px";
// FIXME: DOMString scrollMargin = "0px";
(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 loadEventStart;
readonly attribute unsigned long long loadEventEnd;
[Default] object toJSON();
};

View File

@ -1,5 +1,6 @@
#import <DOM/Element.idl>
// https://drafts.csswg.org/resize-observer/#resize-observer-interface
[Exposed=(Window)]
interface ResizeObserver {
@ -10,8 +11,6 @@ interface ResizeObserver {
};
callback ResizeObserverCallback = void (sequence<ResizeObserverEntry> entries, ResizeObserver observer);
enum ResizeObserverBoxOptions {
"border-box", "content-box", "device-pixel-content-box"
};
@ -19,3 +18,6 @@ enum ResizeObserverBoxOptions {
dictionary ResizeObserverOptions {
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]
interface SVGGradientElement : SVGElement {
// Spread Method Types
const unsigned short SVG_SPREADMETHOD_UNKNOWN = 0;
const unsigned short SVG_SPREADMETHOD_PAD = 1;
const unsigned short SVG_SPREADMETHOD_REFLECT = 2;
const unsigned short SVG_SPREADMETHOD_REPEAT = 3;
// Spread Method Types
const unsigned short SVG_SPREADMETHOD_UNKNOWN = 0;
const unsigned short SVG_SPREADMETHOD_PAD = 1;
const unsigned short SVG_SPREADMETHOD_REFLECT = 2;
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;

View File

@ -4,21 +4,22 @@
[Exposed=Window]
interface SVGTextContentElement : SVGGraphicsElement {
// lengthAdjust Types
const unsigned short LENGTHADJUST_UNKNOWN = 0;
const unsigned short LENGTHADJUST_SPACING = 1;
const unsigned short LENGTHADJUST_SPACINGANDGLYPHS = 2;
// lengthAdjust Types
const unsigned short LENGTHADJUST_UNKNOWN = 0;
const unsigned short LENGTHADJUST_SPACING = 1;
const unsigned short LENGTHADJUST_SPACINGANDGLYPHS = 2;
// FIXME: [SameObject] readonly attribute SVGAnimatedLength textLength;
// FIXME:[SameObject] readonly attribute SVGAnimatedEnumeration lengthAdjust;
// FIXME: [SameObject] readonly attribute SVGAnimatedLength textLength;
// 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
[Exposed=Window]
interface SVGTextPositioningElement : SVGTextContentElement {
// FIXME: [SameObject] readonly attribute SVGAnimatedLengthList x;
// FIXME: [SameObject] readonly attribute SVGAnimatedLengthList y;
// FIXME: [SameObject] readonly attribute SVGAnimatedLengthList dx;
// FIXME: [SameObject] readonly attribute SVGAnimatedLengthList dy;
// FIXME: [SameObject] readonly attribute SVGAnimatedNumberList rotate;
// FIXME: [SameObject] readonly attribute SVGAnimatedLengthList x;
// FIXME: [SameObject] readonly attribute SVGAnimatedLengthList y;
// FIXME: [SameObject] readonly attribute SVGAnimatedLengthList dx;
// FIXME: [SameObject] readonly attribute SVGAnimatedLengthList dy;
// FIXME: [SameObject] readonly attribute SVGAnimatedNumberList rotate;
};

View File

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

View File

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

View File

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

View File

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

View File

@ -15,10 +15,17 @@ dictionary ReadableStreamGetReaderOptions {
interface ReadableStream {
constructor(optional object underlyingSource, optional QueuingStrategy strategy = {});
// FIXME: static ReadableStream from(any asyncIterable);
readonly attribute boolean locked;
Promise<undefined> cancel(optional any reason);
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;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -7,12 +7,12 @@ interface UIEvent : Event {
readonly attribute Window? view;
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);
readonly attribute unsigned long which;
};
// https://w3c.github.io/uievents/#idl-uieventinit
dictionary UIEventInit : EventInit {
Window? view = null;
long detail = 0;

View File

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

View File

@ -2,19 +2,20 @@
[Exposed=*]
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 delete(USVString name);
USVString? get(USVString name);
sequence<USVString> getAll(USVString name);
boolean has(USVString name);
undefined set(USVString name, USVString value);
undefined append(USVString name, USVString value);
undefined delete(USVString name);
USVString? get(USVString name);
sequence<USVString> getAll(USVString name);
boolean has(USVString name);
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>
// https://w3c.github.io/user-timing/#performancemeasure
[Exposed=(Window,Worker)]
interface PerformanceMeasure : PerformanceEntry {
readonly attribute any detail;
};
// https://w3c.github.io/user-timing/#extensions-performance-interface
dictionary PerformanceMeasureOptions {
any detail;
(DOMString or DOMHighResTimeStamp) start;

View File

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

View File

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

View File

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

View File

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