mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 03:55:24 +00:00
LibWeb: Import the streams IDL harness test
This required a bit of manual manipulation. These tests dynamically fetch generated IDL files, e.g.: https://github.com/web-platform-tests/wpt/blob/master/interfaces/streams.idl Our WPT importer is not able to detect the IDL files that need to be imported, so dom.idl and streams.idl was copied over manually. Further, idlharness.js would create URLs of the form "file://interfaces/dom.idl". So idlharness.js was adapted to create a URL relative to the test file.
This commit is contained in:
parent
2ced35e376
commit
a1df41d590
7 changed files with 8604 additions and 0 deletions
235
Tests/LibWeb/Text/expected/wpt-import/streams/idlharness.any.txt
Normal file
235
Tests/LibWeb/Text/expected/wpt-import/streams/idlharness.any.txt
Normal file
|
@ -0,0 +1,235 @@
|
|||
Harness status: OK
|
||||
|
||||
Found 229 tests
|
||||
|
||||
224 Pass
|
||||
5 Fail
|
||||
Pass idl_test setup
|
||||
Pass idl_test validation
|
||||
Pass ReadableStreamDefaultReader includes ReadableStreamGenericReader: member names are unique
|
||||
Pass ReadableStreamBYOBReader includes ReadableStreamGenericReader: member names are unique
|
||||
Pass ReadableStream interface: existence and properties of interface object
|
||||
Pass ReadableStream interface object length
|
||||
Pass ReadableStream interface object name
|
||||
Pass ReadableStream interface: existence and properties of interface prototype object
|
||||
Pass ReadableStream interface: existence and properties of interface prototype object's "constructor" property
|
||||
Pass ReadableStream interface: existence and properties of interface prototype object's @@unscopables property
|
||||
Pass ReadableStream interface: operation from(any)
|
||||
Pass ReadableStream interface: attribute locked
|
||||
Pass ReadableStream interface: operation cancel(optional any)
|
||||
Pass ReadableStream interface: operation getReader(optional ReadableStreamGetReaderOptions)
|
||||
Pass ReadableStream interface: operation pipeThrough(ReadableWritablePair, optional StreamPipeOptions)
|
||||
Pass ReadableStream interface: operation pipeTo(WritableStream, optional StreamPipeOptions)
|
||||
Pass ReadableStream interface: operation tee()
|
||||
Fail ReadableStream interface: async iterable<any>
|
||||
Pass ReadableStream must be primary interface of new ReadableStream()
|
||||
Pass Stringification of new ReadableStream()
|
||||
Pass ReadableStream interface: new ReadableStream() must inherit property "from(any)" with the proper type
|
||||
Pass ReadableStream interface: calling from(any) on new ReadableStream() with too few arguments must throw TypeError
|
||||
Pass ReadableStream interface: new ReadableStream() must inherit property "locked" with the proper type
|
||||
Pass ReadableStream interface: new ReadableStream() must inherit property "cancel(optional any)" with the proper type
|
||||
Pass ReadableStream interface: calling cancel(optional any) on new ReadableStream() with too few arguments must throw TypeError
|
||||
Pass ReadableStream interface: new ReadableStream() must inherit property "getReader(optional ReadableStreamGetReaderOptions)" with the proper type
|
||||
Pass ReadableStream interface: calling getReader(optional ReadableStreamGetReaderOptions) on new ReadableStream() with too few arguments must throw TypeError
|
||||
Pass ReadableStream interface: new ReadableStream() must inherit property "pipeThrough(ReadableWritablePair, optional StreamPipeOptions)" with the proper type
|
||||
Pass ReadableStream interface: calling pipeThrough(ReadableWritablePair, optional StreamPipeOptions) on new ReadableStream() with too few arguments must throw TypeError
|
||||
Pass ReadableStream interface: new ReadableStream() must inherit property "pipeTo(WritableStream, optional StreamPipeOptions)" with the proper type
|
||||
Pass ReadableStream interface: calling pipeTo(WritableStream, optional StreamPipeOptions) on new ReadableStream() with too few arguments must throw TypeError
|
||||
Pass ReadableStream interface: new ReadableStream() must inherit property "tee()" with the proper type
|
||||
Pass ReadableStreamDefaultReader interface: existence and properties of interface object
|
||||
Pass ReadableStreamDefaultReader interface object length
|
||||
Pass ReadableStreamDefaultReader interface object name
|
||||
Pass ReadableStreamDefaultReader interface: existence and properties of interface prototype object
|
||||
Pass ReadableStreamDefaultReader interface: existence and properties of interface prototype object's "constructor" property
|
||||
Pass ReadableStreamDefaultReader interface: existence and properties of interface prototype object's @@unscopables property
|
||||
Pass ReadableStreamDefaultReader interface: operation read()
|
||||
Pass ReadableStreamDefaultReader interface: operation releaseLock()
|
||||
Fail ReadableStreamDefaultReader interface: attribute closed
|
||||
Pass ReadableStreamDefaultReader interface: operation cancel(optional any)
|
||||
Pass ReadableStreamDefaultReader must be primary interface of (new ReadableStream()).getReader()
|
||||
Pass Stringification of (new ReadableStream()).getReader()
|
||||
Pass ReadableStreamDefaultReader interface: (new ReadableStream()).getReader() must inherit property "read()" with the proper type
|
||||
Pass ReadableStreamDefaultReader interface: (new ReadableStream()).getReader() must inherit property "releaseLock()" with the proper type
|
||||
Pass ReadableStreamDefaultReader interface: (new ReadableStream()).getReader() must inherit property "closed" with the proper type
|
||||
Pass ReadableStreamDefaultReader interface: (new ReadableStream()).getReader() must inherit property "cancel(optional any)" with the proper type
|
||||
Pass ReadableStreamDefaultReader interface: calling cancel(optional any) on (new ReadableStream()).getReader() with too few arguments must throw TypeError
|
||||
Pass ReadableStreamBYOBReader interface: existence and properties of interface object
|
||||
Pass ReadableStreamBYOBReader interface object length
|
||||
Pass ReadableStreamBYOBReader interface object name
|
||||
Pass ReadableStreamBYOBReader interface: existence and properties of interface prototype object
|
||||
Pass ReadableStreamBYOBReader interface: existence and properties of interface prototype object's "constructor" property
|
||||
Pass ReadableStreamBYOBReader interface: existence and properties of interface prototype object's @@unscopables property
|
||||
Pass ReadableStreamBYOBReader interface: operation read(ArrayBufferView, optional ReadableStreamBYOBReaderReadOptions)
|
||||
Pass ReadableStreamBYOBReader interface: operation releaseLock()
|
||||
Fail ReadableStreamBYOBReader interface: attribute closed
|
||||
Pass ReadableStreamBYOBReader interface: operation cancel(optional any)
|
||||
Pass ReadableStreamBYOBReader must be primary interface of (new ReadableStream({ type: 'bytes' })).getReader({ mode: 'byob' })
|
||||
Pass Stringification of (new ReadableStream({ type: 'bytes' })).getReader({ mode: 'byob' })
|
||||
Pass ReadableStreamBYOBReader interface: (new ReadableStream({ type: 'bytes' })).getReader({ mode: 'byob' }) must inherit property "read(ArrayBufferView, optional ReadableStreamBYOBReaderReadOptions)" with the proper type
|
||||
Pass ReadableStreamBYOBReader interface: calling read(ArrayBufferView, optional ReadableStreamBYOBReaderReadOptions) on (new ReadableStream({ type: 'bytes' })).getReader({ mode: 'byob' }) with too few arguments must throw TypeError
|
||||
Pass ReadableStreamBYOBReader interface: (new ReadableStream({ type: 'bytes' })).getReader({ mode: 'byob' }) must inherit property "releaseLock()" with the proper type
|
||||
Pass ReadableStreamBYOBReader interface: (new ReadableStream({ type: 'bytes' })).getReader({ mode: 'byob' }) must inherit property "closed" with the proper type
|
||||
Pass ReadableStreamBYOBReader interface: (new ReadableStream({ type: 'bytes' })).getReader({ mode: 'byob' }) must inherit property "cancel(optional any)" with the proper type
|
||||
Pass ReadableStreamBYOBReader interface: calling cancel(optional any) on (new ReadableStream({ type: 'bytes' })).getReader({ mode: 'byob' }) with too few arguments must throw TypeError
|
||||
Pass ReadableStreamDefaultController interface: existence and properties of interface object
|
||||
Pass ReadableStreamDefaultController interface object length
|
||||
Pass ReadableStreamDefaultController interface object name
|
||||
Pass ReadableStreamDefaultController interface: existence and properties of interface prototype object
|
||||
Pass ReadableStreamDefaultController interface: existence and properties of interface prototype object's "constructor" property
|
||||
Pass ReadableStreamDefaultController interface: existence and properties of interface prototype object's @@unscopables property
|
||||
Pass ReadableStreamDefaultController interface: attribute desiredSize
|
||||
Pass ReadableStreamDefaultController interface: operation close()
|
||||
Pass ReadableStreamDefaultController interface: operation enqueue(optional any)
|
||||
Pass ReadableStreamDefaultController interface: operation error(optional any)
|
||||
Pass ReadableStreamDefaultController must be primary interface of self.readableStreamDefaultController
|
||||
Pass Stringification of self.readableStreamDefaultController
|
||||
Pass ReadableStreamDefaultController interface: self.readableStreamDefaultController must inherit property "desiredSize" with the proper type
|
||||
Pass ReadableStreamDefaultController interface: self.readableStreamDefaultController must inherit property "close()" with the proper type
|
||||
Pass ReadableStreamDefaultController interface: self.readableStreamDefaultController must inherit property "enqueue(optional any)" with the proper type
|
||||
Pass ReadableStreamDefaultController interface: calling enqueue(optional any) on self.readableStreamDefaultController with too few arguments must throw TypeError
|
||||
Pass ReadableStreamDefaultController interface: self.readableStreamDefaultController must inherit property "error(optional any)" with the proper type
|
||||
Pass ReadableStreamDefaultController interface: calling error(optional any) on self.readableStreamDefaultController with too few arguments must throw TypeError
|
||||
Pass ReadableByteStreamController interface: existence and properties of interface object
|
||||
Pass ReadableByteStreamController interface object length
|
||||
Pass ReadableByteStreamController interface object name
|
||||
Pass ReadableByteStreamController interface: existence and properties of interface prototype object
|
||||
Pass ReadableByteStreamController interface: existence and properties of interface prototype object's "constructor" property
|
||||
Pass ReadableByteStreamController interface: existence and properties of interface prototype object's @@unscopables property
|
||||
Pass ReadableByteStreamController interface: attribute byobRequest
|
||||
Pass ReadableByteStreamController interface: attribute desiredSize
|
||||
Pass ReadableByteStreamController interface: operation close()
|
||||
Pass ReadableByteStreamController interface: operation enqueue(ArrayBufferView)
|
||||
Pass ReadableByteStreamController interface: operation error(optional any)
|
||||
Pass ReadableByteStreamController must be primary interface of self.readableByteStreamController
|
||||
Pass Stringification of self.readableByteStreamController
|
||||
Pass ReadableByteStreamController interface: self.readableByteStreamController must inherit property "byobRequest" with the proper type
|
||||
Pass ReadableByteStreamController interface: self.readableByteStreamController must inherit property "desiredSize" with the proper type
|
||||
Pass ReadableByteStreamController interface: self.readableByteStreamController must inherit property "close()" with the proper type
|
||||
Pass ReadableByteStreamController interface: self.readableByteStreamController must inherit property "enqueue(ArrayBufferView)" with the proper type
|
||||
Pass ReadableByteStreamController interface: calling enqueue(ArrayBufferView) on self.readableByteStreamController with too few arguments must throw TypeError
|
||||
Pass ReadableByteStreamController interface: self.readableByteStreamController must inherit property "error(optional any)" with the proper type
|
||||
Pass ReadableByteStreamController interface: calling error(optional any) on self.readableByteStreamController with too few arguments must throw TypeError
|
||||
Pass ReadableStreamBYOBRequest interface: existence and properties of interface object
|
||||
Pass ReadableStreamBYOBRequest interface object length
|
||||
Pass ReadableStreamBYOBRequest interface object name
|
||||
Pass ReadableStreamBYOBRequest interface: existence and properties of interface prototype object
|
||||
Pass ReadableStreamBYOBRequest interface: existence and properties of interface prototype object's "constructor" property
|
||||
Pass ReadableStreamBYOBRequest interface: existence and properties of interface prototype object's @@unscopables property
|
||||
Pass ReadableStreamBYOBRequest interface: attribute view
|
||||
Pass ReadableStreamBYOBRequest interface: operation respond(unsigned long long)
|
||||
Pass ReadableStreamBYOBRequest interface: operation respondWithNewView(ArrayBufferView)
|
||||
Pass ReadableStreamBYOBRequest must be primary interface of self.readableStreamByobRequest
|
||||
Pass Stringification of self.readableStreamByobRequest
|
||||
Pass ReadableStreamBYOBRequest interface: self.readableStreamByobRequest must inherit property "view" with the proper type
|
||||
Pass ReadableStreamBYOBRequest interface: self.readableStreamByobRequest must inherit property "respond(unsigned long long)" with the proper type
|
||||
Pass ReadableStreamBYOBRequest interface: calling respond(unsigned long long) on self.readableStreamByobRequest with too few arguments must throw TypeError
|
||||
Pass ReadableStreamBYOBRequest interface: self.readableStreamByobRequest must inherit property "respondWithNewView(ArrayBufferView)" with the proper type
|
||||
Pass ReadableStreamBYOBRequest interface: calling respondWithNewView(ArrayBufferView) on self.readableStreamByobRequest with too few arguments must throw TypeError
|
||||
Pass WritableStream interface: existence and properties of interface object
|
||||
Pass WritableStream interface object length
|
||||
Pass WritableStream interface object name
|
||||
Pass WritableStream interface: existence and properties of interface prototype object
|
||||
Pass WritableStream interface: existence and properties of interface prototype object's "constructor" property
|
||||
Pass WritableStream interface: existence and properties of interface prototype object's @@unscopables property
|
||||
Pass WritableStream interface: attribute locked
|
||||
Pass WritableStream interface: operation abort(optional any)
|
||||
Pass WritableStream interface: operation close()
|
||||
Pass WritableStream interface: operation getWriter()
|
||||
Pass WritableStream must be primary interface of new WritableStream()
|
||||
Pass Stringification of new WritableStream()
|
||||
Pass WritableStream interface: new WritableStream() must inherit property "locked" with the proper type
|
||||
Pass WritableStream interface: new WritableStream() must inherit property "abort(optional any)" with the proper type
|
||||
Pass WritableStream interface: calling abort(optional any) on new WritableStream() with too few arguments must throw TypeError
|
||||
Pass WritableStream interface: new WritableStream() must inherit property "close()" with the proper type
|
||||
Pass WritableStream interface: new WritableStream() must inherit property "getWriter()" with the proper type
|
||||
Pass WritableStreamDefaultWriter interface: existence and properties of interface object
|
||||
Pass WritableStreamDefaultWriter interface object length
|
||||
Pass WritableStreamDefaultWriter interface object name
|
||||
Pass WritableStreamDefaultWriter interface: existence and properties of interface prototype object
|
||||
Pass WritableStreamDefaultWriter interface: existence and properties of interface prototype object's "constructor" property
|
||||
Pass WritableStreamDefaultWriter interface: existence and properties of interface prototype object's @@unscopables property
|
||||
Fail WritableStreamDefaultWriter interface: attribute closed
|
||||
Pass WritableStreamDefaultWriter interface: attribute desiredSize
|
||||
Fail WritableStreamDefaultWriter interface: attribute ready
|
||||
Pass WritableStreamDefaultWriter interface: operation abort(optional any)
|
||||
Pass WritableStreamDefaultWriter interface: operation close()
|
||||
Pass WritableStreamDefaultWriter interface: operation releaseLock()
|
||||
Pass WritableStreamDefaultWriter interface: operation write(optional any)
|
||||
Pass WritableStreamDefaultWriter must be primary interface of (new WritableStream()).getWriter()
|
||||
Pass Stringification of (new WritableStream()).getWriter()
|
||||
Pass WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property "closed" with the proper type
|
||||
Pass WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property "desiredSize" with the proper type
|
||||
Pass WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property "ready" with the proper type
|
||||
Pass WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property "abort(optional any)" with the proper type
|
||||
Pass WritableStreamDefaultWriter interface: calling abort(optional any) on (new WritableStream()).getWriter() with too few arguments must throw TypeError
|
||||
Pass WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property "close()" with the proper type
|
||||
Pass WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property "releaseLock()" with the proper type
|
||||
Pass WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property "write(optional any)" with the proper type
|
||||
Pass WritableStreamDefaultWriter interface: calling write(optional any) on (new WritableStream()).getWriter() with too few arguments must throw TypeError
|
||||
Pass WritableStreamDefaultController interface: existence and properties of interface object
|
||||
Pass WritableStreamDefaultController interface object length
|
||||
Pass WritableStreamDefaultController interface object name
|
||||
Pass WritableStreamDefaultController interface: existence and properties of interface prototype object
|
||||
Pass WritableStreamDefaultController interface: existence and properties of interface prototype object's "constructor" property
|
||||
Pass WritableStreamDefaultController interface: existence and properties of interface prototype object's @@unscopables property
|
||||
Pass WritableStreamDefaultController interface: attribute signal
|
||||
Pass WritableStreamDefaultController interface: operation error(optional any)
|
||||
Pass WritableStreamDefaultController must be primary interface of self.writableStreamDefaultController
|
||||
Pass Stringification of self.writableStreamDefaultController
|
||||
Pass WritableStreamDefaultController interface: self.writableStreamDefaultController must inherit property "signal" with the proper type
|
||||
Pass WritableStreamDefaultController interface: self.writableStreamDefaultController must inherit property "error(optional any)" with the proper type
|
||||
Pass WritableStreamDefaultController interface: calling error(optional any) on self.writableStreamDefaultController with too few arguments must throw TypeError
|
||||
Pass TransformStream interface: existence and properties of interface object
|
||||
Pass TransformStream interface object length
|
||||
Pass TransformStream interface object name
|
||||
Pass TransformStream interface: existence and properties of interface prototype object
|
||||
Pass TransformStream interface: existence and properties of interface prototype object's "constructor" property
|
||||
Pass TransformStream interface: existence and properties of interface prototype object's @@unscopables property
|
||||
Pass TransformStream interface: attribute readable
|
||||
Pass TransformStream interface: attribute writable
|
||||
Pass TransformStream must be primary interface of new TransformStream()
|
||||
Pass Stringification of new TransformStream()
|
||||
Pass TransformStream interface: new TransformStream() must inherit property "readable" with the proper type
|
||||
Pass TransformStream interface: new TransformStream() must inherit property "writable" with the proper type
|
||||
Pass TransformStreamDefaultController interface: existence and properties of interface object
|
||||
Pass TransformStreamDefaultController interface object length
|
||||
Pass TransformStreamDefaultController interface object name
|
||||
Pass TransformStreamDefaultController interface: existence and properties of interface prototype object
|
||||
Pass TransformStreamDefaultController interface: existence and properties of interface prototype object's "constructor" property
|
||||
Pass TransformStreamDefaultController interface: existence and properties of interface prototype object's @@unscopables property
|
||||
Pass TransformStreamDefaultController interface: attribute desiredSize
|
||||
Pass TransformStreamDefaultController interface: operation enqueue(optional any)
|
||||
Pass TransformStreamDefaultController interface: operation error(optional any)
|
||||
Pass TransformStreamDefaultController interface: operation terminate()
|
||||
Pass TransformStreamDefaultController must be primary interface of self.transformStreamDefaultController
|
||||
Pass Stringification of self.transformStreamDefaultController
|
||||
Pass TransformStreamDefaultController interface: self.transformStreamDefaultController must inherit property "desiredSize" with the proper type
|
||||
Pass TransformStreamDefaultController interface: self.transformStreamDefaultController must inherit property "enqueue(optional any)" with the proper type
|
||||
Pass TransformStreamDefaultController interface: calling enqueue(optional any) on self.transformStreamDefaultController with too few arguments must throw TypeError
|
||||
Pass TransformStreamDefaultController interface: self.transformStreamDefaultController must inherit property "error(optional any)" with the proper type
|
||||
Pass TransformStreamDefaultController interface: calling error(optional any) on self.transformStreamDefaultController with too few arguments must throw TypeError
|
||||
Pass TransformStreamDefaultController interface: self.transformStreamDefaultController must inherit property "terminate()" with the proper type
|
||||
Pass ByteLengthQueuingStrategy interface: existence and properties of interface object
|
||||
Pass ByteLengthQueuingStrategy interface object length
|
||||
Pass ByteLengthQueuingStrategy interface object name
|
||||
Pass ByteLengthQueuingStrategy interface: existence and properties of interface prototype object
|
||||
Pass ByteLengthQueuingStrategy interface: existence and properties of interface prototype object's "constructor" property
|
||||
Pass ByteLengthQueuingStrategy interface: existence and properties of interface prototype object's @@unscopables property
|
||||
Pass ByteLengthQueuingStrategy interface: attribute highWaterMark
|
||||
Pass ByteLengthQueuingStrategy interface: attribute size
|
||||
Pass ByteLengthQueuingStrategy must be primary interface of new ByteLengthQueuingStrategy({ highWaterMark: 5 })
|
||||
Pass Stringification of new ByteLengthQueuingStrategy({ highWaterMark: 5 })
|
||||
Pass ByteLengthQueuingStrategy interface: new ByteLengthQueuingStrategy({ highWaterMark: 5 }) must inherit property "highWaterMark" with the proper type
|
||||
Pass ByteLengthQueuingStrategy interface: new ByteLengthQueuingStrategy({ highWaterMark: 5 }) must inherit property "size" with the proper type
|
||||
Pass CountQueuingStrategy interface: existence and properties of interface object
|
||||
Pass CountQueuingStrategy interface object length
|
||||
Pass CountQueuingStrategy interface object name
|
||||
Pass CountQueuingStrategy interface: existence and properties of interface prototype object
|
||||
Pass CountQueuingStrategy interface: existence and properties of interface prototype object's "constructor" property
|
||||
Pass CountQueuingStrategy interface: existence and properties of interface prototype object's @@unscopables property
|
||||
Pass CountQueuingStrategy interface: attribute highWaterMark
|
||||
Pass CountQueuingStrategy interface: attribute size
|
||||
Pass CountQueuingStrategy must be primary interface of new CountQueuingStrategy({ highWaterMark: 5 })
|
||||
Pass Stringification of new CountQueuingStrategy({ highWaterMark: 5 })
|
||||
Pass CountQueuingStrategy interface: new CountQueuingStrategy({ highWaterMark: 5 }) must inherit property "highWaterMark" with the proper type
|
||||
Pass CountQueuingStrategy interface: new CountQueuingStrategy({ highWaterMark: 5 }) must inherit property "size" with the proper type
|
652
Tests/LibWeb/Text/input/wpt-import/interfaces/dom.idl
Normal file
652
Tests/LibWeb/Text/input/wpt-import/interfaces/dom.idl
Normal file
|
@ -0,0 +1,652 @@
|
|||
// GENERATED CONTENT - DO NOT EDIT
|
||||
// Content was automatically extracted by Reffy into webref
|
||||
// (https://github.com/w3c/webref)
|
||||
// Source: DOM Standard (https://dom.spec.whatwg.org/)
|
||||
|
||||
[Exposed=*]
|
||||
interface Event {
|
||||
constructor(DOMString type, optional EventInit eventInitDict = {});
|
||||
|
||||
readonly attribute DOMString type;
|
||||
readonly attribute EventTarget? target;
|
||||
readonly attribute EventTarget? srcElement; // legacy
|
||||
readonly attribute EventTarget? currentTarget;
|
||||
sequence<EventTarget> composedPath();
|
||||
|
||||
const unsigned short NONE = 0;
|
||||
const unsigned short CAPTURING_PHASE = 1;
|
||||
const unsigned short AT_TARGET = 2;
|
||||
const unsigned short BUBBLING_PHASE = 3;
|
||||
readonly attribute unsigned short eventPhase;
|
||||
|
||||
undefined stopPropagation();
|
||||
attribute boolean cancelBubble; // legacy alias of .stopPropagation()
|
||||
undefined stopImmediatePropagation();
|
||||
|
||||
readonly attribute boolean bubbles;
|
||||
readonly attribute boolean cancelable;
|
||||
attribute boolean returnValue; // legacy
|
||||
undefined preventDefault();
|
||||
readonly attribute boolean defaultPrevented;
|
||||
readonly attribute boolean composed;
|
||||
|
||||
[LegacyUnforgeable] readonly attribute boolean isTrusted;
|
||||
readonly attribute DOMHighResTimeStamp timeStamp;
|
||||
|
||||
undefined initEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false); // legacy
|
||||
};
|
||||
|
||||
dictionary EventInit {
|
||||
boolean bubbles = false;
|
||||
boolean cancelable = false;
|
||||
boolean composed = false;
|
||||
};
|
||||
|
||||
partial interface Window {
|
||||
[Replaceable] readonly attribute (Event or undefined) event; // legacy
|
||||
};
|
||||
|
||||
[Exposed=*]
|
||||
interface CustomEvent : Event {
|
||||
constructor(DOMString type, optional CustomEventInit eventInitDict = {});
|
||||
|
||||
readonly attribute any detail;
|
||||
|
||||
undefined initCustomEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false, optional any detail = null); // legacy
|
||||
};
|
||||
|
||||
dictionary CustomEventInit : EventInit {
|
||||
any detail = null;
|
||||
};
|
||||
|
||||
[Exposed=*]
|
||||
interface EventTarget {
|
||||
constructor();
|
||||
|
||||
undefined addEventListener(DOMString type, EventListener? callback, optional (AddEventListenerOptions or boolean) options = {});
|
||||
undefined removeEventListener(DOMString type, EventListener? callback, optional (EventListenerOptions or boolean) options = {});
|
||||
boolean dispatchEvent(Event event);
|
||||
};
|
||||
|
||||
callback interface EventListener {
|
||||
undefined handleEvent(Event event);
|
||||
};
|
||||
|
||||
dictionary EventListenerOptions {
|
||||
boolean capture = false;
|
||||
};
|
||||
|
||||
dictionary AddEventListenerOptions : EventListenerOptions {
|
||||
boolean passive;
|
||||
boolean once = false;
|
||||
AbortSignal signal;
|
||||
};
|
||||
|
||||
[Exposed=*]
|
||||
interface AbortController {
|
||||
constructor();
|
||||
|
||||
[SameObject] readonly attribute AbortSignal signal;
|
||||
|
||||
undefined abort(optional any reason);
|
||||
};
|
||||
|
||||
[Exposed=*]
|
||||
interface AbortSignal : EventTarget {
|
||||
[NewObject] static AbortSignal abort(optional any reason);
|
||||
[Exposed=(Window,Worker), NewObject] static AbortSignal timeout([EnforceRange] unsigned long long milliseconds);
|
||||
[NewObject] static AbortSignal _any(sequence<AbortSignal> signals);
|
||||
|
||||
readonly attribute boolean aborted;
|
||||
readonly attribute any reason;
|
||||
undefined throwIfAborted();
|
||||
|
||||
attribute EventHandler onabort;
|
||||
};
|
||||
interface mixin NonElementParentNode {
|
||||
Element? getElementById(DOMString elementId);
|
||||
};
|
||||
Document includes NonElementParentNode;
|
||||
DocumentFragment includes NonElementParentNode;
|
||||
|
||||
interface mixin DocumentOrShadowRoot {
|
||||
};
|
||||
Document includes DocumentOrShadowRoot;
|
||||
ShadowRoot includes DocumentOrShadowRoot;
|
||||
|
||||
interface mixin ParentNode {
|
||||
[SameObject] readonly attribute HTMLCollection children;
|
||||
readonly attribute Element? firstElementChild;
|
||||
readonly attribute Element? lastElementChild;
|
||||
readonly attribute unsigned long childElementCount;
|
||||
|
||||
[CEReactions, Unscopable] undefined prepend((Node or DOMString)... nodes);
|
||||
[CEReactions, Unscopable] undefined append((Node or DOMString)... nodes);
|
||||
[CEReactions, Unscopable] undefined replaceChildren((Node or DOMString)... nodes);
|
||||
|
||||
[CEReactions] undefined moveBefore(Node node, Node? child);
|
||||
|
||||
Element? querySelector(DOMString selectors);
|
||||
[NewObject] NodeList querySelectorAll(DOMString selectors);
|
||||
};
|
||||
Document includes ParentNode;
|
||||
DocumentFragment includes ParentNode;
|
||||
Element includes ParentNode;
|
||||
|
||||
interface mixin NonDocumentTypeChildNode {
|
||||
readonly attribute Element? previousElementSibling;
|
||||
readonly attribute Element? nextElementSibling;
|
||||
};
|
||||
Element includes NonDocumentTypeChildNode;
|
||||
CharacterData includes NonDocumentTypeChildNode;
|
||||
|
||||
interface mixin ChildNode {
|
||||
[CEReactions, Unscopable] undefined before((Node or DOMString)... nodes);
|
||||
[CEReactions, Unscopable] undefined after((Node or DOMString)... nodes);
|
||||
[CEReactions, Unscopable] undefined replaceWith((Node or DOMString)... nodes);
|
||||
[CEReactions, Unscopable] undefined remove();
|
||||
};
|
||||
DocumentType includes ChildNode;
|
||||
Element includes ChildNode;
|
||||
CharacterData includes ChildNode;
|
||||
|
||||
interface mixin Slottable {
|
||||
readonly attribute HTMLSlotElement? assignedSlot;
|
||||
};
|
||||
Element includes Slottable;
|
||||
Text includes Slottable;
|
||||
|
||||
[Exposed=Window]
|
||||
interface NodeList {
|
||||
getter Node? item(unsigned long index);
|
||||
readonly attribute unsigned long length;
|
||||
iterable<Node>;
|
||||
};
|
||||
|
||||
[Exposed=Window, LegacyUnenumerableNamedProperties]
|
||||
interface HTMLCollection {
|
||||
readonly attribute unsigned long length;
|
||||
getter Element? item(unsigned long index);
|
||||
getter Element? namedItem(DOMString name);
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface MutationObserver {
|
||||
constructor(MutationCallback callback);
|
||||
|
||||
undefined observe(Node target, optional MutationObserverInit options = {});
|
||||
undefined disconnect();
|
||||
sequence<MutationRecord> takeRecords();
|
||||
};
|
||||
|
||||
callback MutationCallback = undefined (sequence<MutationRecord> mutations, MutationObserver observer);
|
||||
|
||||
dictionary MutationObserverInit {
|
||||
boolean childList = false;
|
||||
boolean attributes;
|
||||
boolean characterData;
|
||||
boolean subtree = false;
|
||||
boolean attributeOldValue;
|
||||
boolean characterDataOldValue;
|
||||
sequence<DOMString> attributeFilter;
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface MutationRecord {
|
||||
readonly attribute DOMString type;
|
||||
[SameObject] readonly attribute Node target;
|
||||
[SameObject] readonly attribute NodeList addedNodes;
|
||||
[SameObject] readonly attribute NodeList removedNodes;
|
||||
readonly attribute Node? previousSibling;
|
||||
readonly attribute Node? nextSibling;
|
||||
readonly attribute DOMString? attributeName;
|
||||
readonly attribute DOMString? attributeNamespace;
|
||||
readonly attribute DOMString? oldValue;
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface Node : EventTarget {
|
||||
const unsigned short ELEMENT_NODE = 1;
|
||||
const unsigned short ATTRIBUTE_NODE = 2;
|
||||
const unsigned short TEXT_NODE = 3;
|
||||
const unsigned short CDATA_SECTION_NODE = 4;
|
||||
const unsigned short ENTITY_REFERENCE_NODE = 5; // legacy
|
||||
const unsigned short ENTITY_NODE = 6; // legacy
|
||||
const unsigned short PROCESSING_INSTRUCTION_NODE = 7;
|
||||
const unsigned short COMMENT_NODE = 8;
|
||||
const unsigned short DOCUMENT_NODE = 9;
|
||||
const unsigned short DOCUMENT_TYPE_NODE = 10;
|
||||
const unsigned short DOCUMENT_FRAGMENT_NODE = 11;
|
||||
const unsigned short NOTATION_NODE = 12; // legacy
|
||||
readonly attribute unsigned short nodeType;
|
||||
readonly attribute DOMString nodeName;
|
||||
|
||||
readonly attribute USVString baseURI;
|
||||
|
||||
readonly attribute boolean isConnected;
|
||||
readonly attribute Document? ownerDocument;
|
||||
Node getRootNode(optional GetRootNodeOptions options = {});
|
||||
readonly attribute Node? parentNode;
|
||||
readonly attribute Element? parentElement;
|
||||
boolean hasChildNodes();
|
||||
[SameObject] readonly attribute NodeList childNodes;
|
||||
readonly attribute Node? firstChild;
|
||||
readonly attribute Node? lastChild;
|
||||
readonly attribute Node? previousSibling;
|
||||
readonly attribute Node? nextSibling;
|
||||
|
||||
[CEReactions] attribute DOMString? nodeValue;
|
||||
[CEReactions] attribute DOMString? textContent;
|
||||
[CEReactions] undefined normalize();
|
||||
|
||||
[CEReactions, NewObject] Node cloneNode(optional boolean subtree = false);
|
||||
boolean isEqualNode(Node? otherNode);
|
||||
boolean isSameNode(Node? otherNode); // legacy alias of ===
|
||||
|
||||
const unsigned short DOCUMENT_POSITION_DISCONNECTED = 0x01;
|
||||
const unsigned short DOCUMENT_POSITION_PRECEDING = 0x02;
|
||||
const unsigned short DOCUMENT_POSITION_FOLLOWING = 0x04;
|
||||
const unsigned short DOCUMENT_POSITION_CONTAINS = 0x08;
|
||||
const unsigned short DOCUMENT_POSITION_CONTAINED_BY = 0x10;
|
||||
const unsigned short DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20;
|
||||
unsigned short compareDocumentPosition(Node other);
|
||||
boolean contains(Node? other);
|
||||
|
||||
DOMString? lookupPrefix(DOMString? namespace);
|
||||
DOMString? lookupNamespaceURI(DOMString? prefix);
|
||||
boolean isDefaultNamespace(DOMString? namespace);
|
||||
|
||||
[CEReactions] Node insertBefore(Node node, Node? child);
|
||||
[CEReactions] Node appendChild(Node node);
|
||||
[CEReactions] Node replaceChild(Node node, Node child);
|
||||
[CEReactions] Node removeChild(Node child);
|
||||
};
|
||||
|
||||
dictionary GetRootNodeOptions {
|
||||
boolean composed = false;
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface Document : Node {
|
||||
constructor();
|
||||
|
||||
[SameObject] readonly attribute DOMImplementation implementation;
|
||||
readonly attribute USVString URL;
|
||||
readonly attribute USVString documentURI;
|
||||
readonly attribute DOMString compatMode;
|
||||
readonly attribute DOMString characterSet;
|
||||
readonly attribute DOMString charset; // legacy alias of .characterSet
|
||||
readonly attribute DOMString inputEncoding; // legacy alias of .characterSet
|
||||
readonly attribute DOMString contentType;
|
||||
|
||||
readonly attribute DocumentType? doctype;
|
||||
readonly attribute Element? documentElement;
|
||||
HTMLCollection getElementsByTagName(DOMString qualifiedName);
|
||||
HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
|
||||
HTMLCollection getElementsByClassName(DOMString classNames);
|
||||
|
||||
[CEReactions, NewObject] Element createElement(DOMString localName, optional (DOMString or ElementCreationOptions) options = {});
|
||||
[CEReactions, NewObject] Element createElementNS(DOMString? namespace, DOMString qualifiedName, optional (DOMString or ElementCreationOptions) options = {});
|
||||
[NewObject] DocumentFragment createDocumentFragment();
|
||||
[NewObject] Text createTextNode(DOMString data);
|
||||
[NewObject] CDATASection createCDATASection(DOMString data);
|
||||
[NewObject] Comment createComment(DOMString data);
|
||||
[NewObject] ProcessingInstruction createProcessingInstruction(DOMString target, DOMString data);
|
||||
|
||||
[CEReactions, NewObject] Node importNode(Node node, optional boolean subtree = false);
|
||||
[CEReactions] Node adoptNode(Node node);
|
||||
|
||||
[NewObject] Attr createAttribute(DOMString localName);
|
||||
[NewObject] Attr createAttributeNS(DOMString? namespace, DOMString qualifiedName);
|
||||
|
||||
[NewObject] Event createEvent(DOMString interface); // legacy
|
||||
|
||||
[NewObject] Range createRange();
|
||||
|
||||
// NodeFilter.SHOW_ALL = 0xFFFFFFFF
|
||||
[NewObject] NodeIterator createNodeIterator(Node root, optional unsigned long whatToShow = 0xFFFFFFFF, optional NodeFilter? filter = null);
|
||||
[NewObject] TreeWalker createTreeWalker(Node root, optional unsigned long whatToShow = 0xFFFFFFFF, optional NodeFilter? filter = null);
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface XMLDocument : Document {};
|
||||
|
||||
dictionary ElementCreationOptions {
|
||||
DOMString is;
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface DOMImplementation {
|
||||
[NewObject] DocumentType createDocumentType(DOMString qualifiedName, DOMString publicId, DOMString systemId);
|
||||
[NewObject] XMLDocument createDocument(DOMString? namespace, [LegacyNullToEmptyString] DOMString qualifiedName, optional DocumentType? doctype = null);
|
||||
[NewObject] Document createHTMLDocument(optional DOMString title);
|
||||
|
||||
boolean hasFeature(); // useless; always returns true
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface DocumentType : Node {
|
||||
readonly attribute DOMString name;
|
||||
readonly attribute DOMString publicId;
|
||||
readonly attribute DOMString systemId;
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface DocumentFragment : Node {
|
||||
constructor();
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface ShadowRoot : DocumentFragment {
|
||||
readonly attribute ShadowRootMode mode;
|
||||
readonly attribute boolean delegatesFocus;
|
||||
readonly attribute SlotAssignmentMode slotAssignment;
|
||||
readonly attribute boolean clonable;
|
||||
readonly attribute boolean serializable;
|
||||
readonly attribute Element host;
|
||||
attribute EventHandler onslotchange;
|
||||
};
|
||||
|
||||
enum ShadowRootMode { "open", "closed" };
|
||||
enum SlotAssignmentMode { "manual", "named" };
|
||||
|
||||
[Exposed=Window]
|
||||
interface Element : Node {
|
||||
readonly attribute DOMString? namespaceURI;
|
||||
readonly attribute DOMString? prefix;
|
||||
readonly attribute DOMString localName;
|
||||
readonly attribute DOMString tagName;
|
||||
|
||||
[CEReactions] attribute DOMString id;
|
||||
[CEReactions] attribute DOMString className;
|
||||
[SameObject, PutForwards=value] readonly attribute DOMTokenList classList;
|
||||
[CEReactions, Unscopable] attribute DOMString slot;
|
||||
|
||||
boolean hasAttributes();
|
||||
[SameObject] readonly attribute NamedNodeMap attributes;
|
||||
sequence<DOMString> getAttributeNames();
|
||||
DOMString? getAttribute(DOMString qualifiedName);
|
||||
DOMString? getAttributeNS(DOMString? namespace, DOMString localName);
|
||||
[CEReactions] undefined setAttribute(DOMString qualifiedName, DOMString value);
|
||||
[CEReactions] undefined setAttributeNS(DOMString? namespace, DOMString qualifiedName, DOMString value);
|
||||
[CEReactions] undefined removeAttribute(DOMString qualifiedName);
|
||||
[CEReactions] undefined removeAttributeNS(DOMString? namespace, DOMString localName);
|
||||
[CEReactions] boolean toggleAttribute(DOMString qualifiedName, optional boolean force);
|
||||
boolean hasAttribute(DOMString qualifiedName);
|
||||
boolean hasAttributeNS(DOMString? namespace, DOMString localName);
|
||||
|
||||
Attr? getAttributeNode(DOMString qualifiedName);
|
||||
Attr? getAttributeNodeNS(DOMString? namespace, DOMString localName);
|
||||
[CEReactions] Attr? setAttributeNode(Attr attr);
|
||||
[CEReactions] Attr? setAttributeNodeNS(Attr attr);
|
||||
[CEReactions] Attr removeAttributeNode(Attr attr);
|
||||
|
||||
ShadowRoot attachShadow(ShadowRootInit init);
|
||||
readonly attribute ShadowRoot? shadowRoot;
|
||||
|
||||
Element? closest(DOMString selectors);
|
||||
boolean matches(DOMString selectors);
|
||||
boolean webkitMatchesSelector(DOMString selectors); // legacy alias of .matches
|
||||
|
||||
HTMLCollection getElementsByTagName(DOMString qualifiedName);
|
||||
HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
|
||||
HTMLCollection getElementsByClassName(DOMString classNames);
|
||||
|
||||
[CEReactions] Element? insertAdjacentElement(DOMString where, Element element); // legacy
|
||||
undefined insertAdjacentText(DOMString where, DOMString data); // legacy
|
||||
};
|
||||
|
||||
dictionary ShadowRootInit {
|
||||
required ShadowRootMode mode;
|
||||
boolean delegatesFocus = false;
|
||||
SlotAssignmentMode slotAssignment = "named";
|
||||
boolean clonable = false;
|
||||
boolean serializable = false;
|
||||
};
|
||||
|
||||
[Exposed=Window,
|
||||
LegacyUnenumerableNamedProperties]
|
||||
interface NamedNodeMap {
|
||||
readonly attribute unsigned long length;
|
||||
getter Attr? item(unsigned long index);
|
||||
getter Attr? getNamedItem(DOMString qualifiedName);
|
||||
Attr? getNamedItemNS(DOMString? namespace, DOMString localName);
|
||||
[CEReactions] Attr? setNamedItem(Attr attr);
|
||||
[CEReactions] Attr? setNamedItemNS(Attr attr);
|
||||
[CEReactions] Attr removeNamedItem(DOMString qualifiedName);
|
||||
[CEReactions] Attr removeNamedItemNS(DOMString? namespace, DOMString localName);
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface Attr : Node {
|
||||
readonly attribute DOMString? namespaceURI;
|
||||
readonly attribute DOMString? prefix;
|
||||
readonly attribute DOMString localName;
|
||||
readonly attribute DOMString name;
|
||||
[CEReactions] attribute DOMString value;
|
||||
|
||||
readonly attribute Element? ownerElement;
|
||||
|
||||
readonly attribute boolean specified; // useless; always returns true
|
||||
};
|
||||
[Exposed=Window]
|
||||
interface CharacterData : Node {
|
||||
attribute [LegacyNullToEmptyString] DOMString data;
|
||||
readonly attribute unsigned long length;
|
||||
DOMString substringData(unsigned long offset, unsigned long count);
|
||||
undefined appendData(DOMString data);
|
||||
undefined insertData(unsigned long offset, DOMString data);
|
||||
undefined deleteData(unsigned long offset, unsigned long count);
|
||||
undefined replaceData(unsigned long offset, unsigned long count, DOMString data);
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface Text : CharacterData {
|
||||
constructor(optional DOMString data = "");
|
||||
|
||||
[NewObject] Text splitText(unsigned long offset);
|
||||
readonly attribute DOMString wholeText;
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface CDATASection : Text {
|
||||
};
|
||||
[Exposed=Window]
|
||||
interface ProcessingInstruction : CharacterData {
|
||||
readonly attribute DOMString target;
|
||||
};
|
||||
[Exposed=Window]
|
||||
interface Comment : CharacterData {
|
||||
constructor(optional DOMString data = "");
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface AbstractRange {
|
||||
readonly attribute Node startContainer;
|
||||
readonly attribute unsigned long startOffset;
|
||||
readonly attribute Node endContainer;
|
||||
readonly attribute unsigned long endOffset;
|
||||
readonly attribute boolean collapsed;
|
||||
};
|
||||
|
||||
dictionary StaticRangeInit {
|
||||
required Node startContainer;
|
||||
required unsigned long startOffset;
|
||||
required Node endContainer;
|
||||
required unsigned long endOffset;
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface StaticRange : AbstractRange {
|
||||
constructor(StaticRangeInit init);
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface Range : AbstractRange {
|
||||
constructor();
|
||||
|
||||
readonly attribute Node commonAncestorContainer;
|
||||
|
||||
undefined setStart(Node node, unsigned long offset);
|
||||
undefined setEnd(Node node, unsigned long offset);
|
||||
undefined setStartBefore(Node node);
|
||||
undefined setStartAfter(Node node);
|
||||
undefined setEndBefore(Node node);
|
||||
undefined setEndAfter(Node node);
|
||||
undefined collapse(optional boolean toStart = false);
|
||||
undefined selectNode(Node node);
|
||||
undefined selectNodeContents(Node node);
|
||||
|
||||
const unsigned short START_TO_START = 0;
|
||||
const unsigned short START_TO_END = 1;
|
||||
const unsigned short END_TO_END = 2;
|
||||
const unsigned short END_TO_START = 3;
|
||||
short compareBoundaryPoints(unsigned short how, Range sourceRange);
|
||||
|
||||
[CEReactions] undefined deleteContents();
|
||||
[CEReactions, NewObject] DocumentFragment extractContents();
|
||||
[CEReactions, NewObject] DocumentFragment cloneContents();
|
||||
[CEReactions] undefined insertNode(Node node);
|
||||
[CEReactions] undefined surroundContents(Node newParent);
|
||||
|
||||
[NewObject] Range cloneRange();
|
||||
undefined detach();
|
||||
|
||||
boolean isPointInRange(Node node, unsigned long offset);
|
||||
short comparePoint(Node node, unsigned long offset);
|
||||
|
||||
boolean intersectsNode(Node node);
|
||||
|
||||
stringifier;
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface NodeIterator {
|
||||
[SameObject] readonly attribute Node root;
|
||||
readonly attribute Node referenceNode;
|
||||
readonly attribute boolean pointerBeforeReferenceNode;
|
||||
readonly attribute unsigned long whatToShow;
|
||||
readonly attribute NodeFilter? filter;
|
||||
|
||||
Node? nextNode();
|
||||
Node? previousNode();
|
||||
|
||||
undefined detach();
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface TreeWalker {
|
||||
[SameObject] readonly attribute Node root;
|
||||
readonly attribute unsigned long whatToShow;
|
||||
readonly attribute NodeFilter? filter;
|
||||
attribute Node currentNode;
|
||||
|
||||
Node? parentNode();
|
||||
Node? firstChild();
|
||||
Node? lastChild();
|
||||
Node? previousSibling();
|
||||
Node? nextSibling();
|
||||
Node? previousNode();
|
||||
Node? nextNode();
|
||||
};
|
||||
[Exposed=Window]
|
||||
callback interface NodeFilter {
|
||||
// Constants for acceptNode()
|
||||
const unsigned short FILTER_ACCEPT = 1;
|
||||
const unsigned short FILTER_REJECT = 2;
|
||||
const unsigned short FILTER_SKIP = 3;
|
||||
|
||||
// Constants for whatToShow
|
||||
const unsigned long SHOW_ALL = 0xFFFFFFFF;
|
||||
const unsigned long SHOW_ELEMENT = 0x1;
|
||||
const unsigned long SHOW_ATTRIBUTE = 0x2;
|
||||
const unsigned long SHOW_TEXT = 0x4;
|
||||
const unsigned long SHOW_CDATA_SECTION = 0x8;
|
||||
const unsigned long SHOW_ENTITY_REFERENCE = 0x10; // legacy
|
||||
const unsigned long SHOW_ENTITY = 0x20; // legacy
|
||||
const unsigned long SHOW_PROCESSING_INSTRUCTION = 0x40;
|
||||
const unsigned long SHOW_COMMENT = 0x80;
|
||||
const unsigned long SHOW_DOCUMENT = 0x100;
|
||||
const unsigned long SHOW_DOCUMENT_TYPE = 0x200;
|
||||
const unsigned long SHOW_DOCUMENT_FRAGMENT = 0x400;
|
||||
const unsigned long SHOW_NOTATION = 0x800; // legacy
|
||||
|
||||
unsigned short acceptNode(Node node);
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface DOMTokenList {
|
||||
readonly attribute unsigned long length;
|
||||
getter DOMString? item(unsigned long index);
|
||||
boolean contains(DOMString token);
|
||||
[CEReactions] undefined add(DOMString... tokens);
|
||||
[CEReactions] undefined remove(DOMString... tokens);
|
||||
[CEReactions] boolean toggle(DOMString token, optional boolean force);
|
||||
[CEReactions] boolean replace(DOMString token, DOMString newToken);
|
||||
boolean supports(DOMString token);
|
||||
[CEReactions] stringifier attribute DOMString value;
|
||||
iterable<DOMString>;
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface XPathResult {
|
||||
const unsigned short ANY_TYPE = 0;
|
||||
const unsigned short NUMBER_TYPE = 1;
|
||||
const unsigned short STRING_TYPE = 2;
|
||||
const unsigned short BOOLEAN_TYPE = 3;
|
||||
const unsigned short UNORDERED_NODE_ITERATOR_TYPE = 4;
|
||||
const unsigned short ORDERED_NODE_ITERATOR_TYPE = 5;
|
||||
const unsigned short UNORDERED_NODE_SNAPSHOT_TYPE = 6;
|
||||
const unsigned short ORDERED_NODE_SNAPSHOT_TYPE = 7;
|
||||
const unsigned short ANY_UNORDERED_NODE_TYPE = 8;
|
||||
const unsigned short FIRST_ORDERED_NODE_TYPE = 9;
|
||||
|
||||
readonly attribute unsigned short resultType;
|
||||
readonly attribute unrestricted double numberValue;
|
||||
readonly attribute DOMString stringValue;
|
||||
readonly attribute boolean booleanValue;
|
||||
readonly attribute Node? singleNodeValue;
|
||||
readonly attribute boolean invalidIteratorState;
|
||||
readonly attribute unsigned long snapshotLength;
|
||||
|
||||
Node? iterateNext();
|
||||
Node? snapshotItem(unsigned long index);
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface XPathExpression {
|
||||
// XPathResult.ANY_TYPE = 0
|
||||
XPathResult evaluate(Node contextNode, optional unsigned short type = 0, optional XPathResult? result = null);
|
||||
};
|
||||
|
||||
callback interface XPathNSResolver {
|
||||
DOMString? lookupNamespaceURI(DOMString? prefix);
|
||||
};
|
||||
|
||||
interface mixin XPathEvaluatorBase {
|
||||
[NewObject] XPathExpression createExpression(DOMString expression, optional XPathNSResolver? resolver = null);
|
||||
Node createNSResolver(Node nodeResolver); // legacy
|
||||
// XPathResult.ANY_TYPE = 0
|
||||
XPathResult evaluate(DOMString expression, Node contextNode, optional XPathNSResolver? resolver = null, optional unsigned short type = 0, optional XPathResult? result = null);
|
||||
};
|
||||
Document includes XPathEvaluatorBase;
|
||||
|
||||
[Exposed=Window]
|
||||
interface XPathEvaluator {
|
||||
constructor();
|
||||
};
|
||||
|
||||
XPathEvaluator includes XPathEvaluatorBase;
|
||||
|
||||
[Exposed=Window]
|
||||
interface XSLTProcessor {
|
||||
constructor();
|
||||
undefined importStylesheet(Node style);
|
||||
[CEReactions] DocumentFragment transformToFragment(Node source, Document output);
|
||||
[CEReactions] Document transformToDocument(Node source);
|
||||
undefined setParameter([LegacyNullToEmptyString] DOMString namespaceURI, DOMString localName, any value);
|
||||
any getParameter([LegacyNullToEmptyString] DOMString namespaceURI, DOMString localName);
|
||||
undefined removeParameter([LegacyNullToEmptyString] DOMString namespaceURI, DOMString localName);
|
||||
undefined clearParameters();
|
||||
undefined reset();
|
||||
};
|
230
Tests/LibWeb/Text/input/wpt-import/interfaces/streams.idl
Normal file
230
Tests/LibWeb/Text/input/wpt-import/interfaces/streams.idl
Normal file
|
@ -0,0 +1,230 @@
|
|||
// GENERATED CONTENT - DO NOT EDIT
|
||||
// Content was automatically extracted by Reffy into webref
|
||||
// (https://github.com/w3c/webref)
|
||||
// Source: Streams Standard (https://streams.spec.whatwg.org/)
|
||||
|
||||
[Exposed=*, Transferable]
|
||||
interface ReadableStream {
|
||||
constructor(optional object underlyingSource, optional QueuingStrategy strategy = {});
|
||||
|
||||
static ReadableStream from(any asyncIterable);
|
||||
|
||||
readonly attribute boolean locked;
|
||||
|
||||
Promise<undefined> cancel(optional any reason);
|
||||
ReadableStreamReader getReader(optional ReadableStreamGetReaderOptions options = {});
|
||||
ReadableStream pipeThrough(ReadableWritablePair transform, optional StreamPipeOptions options = {});
|
||||
Promise<undefined> pipeTo(WritableStream destination, optional StreamPipeOptions options = {});
|
||||
sequence<ReadableStream> tee();
|
||||
|
||||
async iterable<any>(optional ReadableStreamIteratorOptions options = {});
|
||||
};
|
||||
|
||||
typedef (ReadableStreamDefaultReader or ReadableStreamBYOBReader) ReadableStreamReader;
|
||||
|
||||
enum ReadableStreamReaderMode { "byob" };
|
||||
|
||||
dictionary ReadableStreamGetReaderOptions {
|
||||
ReadableStreamReaderMode mode;
|
||||
};
|
||||
|
||||
dictionary ReadableStreamIteratorOptions {
|
||||
boolean preventCancel = false;
|
||||
};
|
||||
|
||||
dictionary ReadableWritablePair {
|
||||
required ReadableStream readable;
|
||||
required WritableStream writable;
|
||||
};
|
||||
|
||||
dictionary StreamPipeOptions {
|
||||
boolean preventClose = false;
|
||||
boolean preventAbort = false;
|
||||
boolean preventCancel = false;
|
||||
AbortSignal signal;
|
||||
};
|
||||
|
||||
dictionary UnderlyingSource {
|
||||
UnderlyingSourceStartCallback start;
|
||||
UnderlyingSourcePullCallback pull;
|
||||
UnderlyingSourceCancelCallback cancel;
|
||||
ReadableStreamType type;
|
||||
[EnforceRange] unsigned long long autoAllocateChunkSize;
|
||||
};
|
||||
|
||||
typedef (ReadableStreamDefaultController or ReadableByteStreamController) ReadableStreamController;
|
||||
|
||||
callback UnderlyingSourceStartCallback = any (ReadableStreamController controller);
|
||||
callback UnderlyingSourcePullCallback = Promise<undefined> (ReadableStreamController controller);
|
||||
callback UnderlyingSourceCancelCallback = Promise<undefined> (optional any reason);
|
||||
|
||||
enum ReadableStreamType { "bytes" };
|
||||
|
||||
interface mixin ReadableStreamGenericReader {
|
||||
readonly attribute Promise<undefined> closed;
|
||||
|
||||
Promise<undefined> cancel(optional any reason);
|
||||
};
|
||||
|
||||
[Exposed=*]
|
||||
interface ReadableStreamDefaultReader {
|
||||
constructor(ReadableStream stream);
|
||||
|
||||
Promise<ReadableStreamReadResult> read();
|
||||
undefined releaseLock();
|
||||
};
|
||||
ReadableStreamDefaultReader includes ReadableStreamGenericReader;
|
||||
|
||||
dictionary ReadableStreamReadResult {
|
||||
any value;
|
||||
boolean done;
|
||||
};
|
||||
|
||||
[Exposed=*]
|
||||
interface ReadableStreamBYOBReader {
|
||||
constructor(ReadableStream stream);
|
||||
|
||||
Promise<ReadableStreamReadResult> read(ArrayBufferView view, optional ReadableStreamBYOBReaderReadOptions options = {});
|
||||
undefined releaseLock();
|
||||
};
|
||||
ReadableStreamBYOBReader includes ReadableStreamGenericReader;
|
||||
|
||||
dictionary ReadableStreamBYOBReaderReadOptions {
|
||||
[EnforceRange] unsigned long long min = 1;
|
||||
};
|
||||
|
||||
[Exposed=*]
|
||||
interface ReadableStreamDefaultController {
|
||||
readonly attribute unrestricted double? desiredSize;
|
||||
|
||||
undefined close();
|
||||
undefined enqueue(optional any chunk);
|
||||
undefined error(optional any e);
|
||||
};
|
||||
|
||||
[Exposed=*]
|
||||
interface ReadableByteStreamController {
|
||||
readonly attribute ReadableStreamBYOBRequest? byobRequest;
|
||||
readonly attribute unrestricted double? desiredSize;
|
||||
|
||||
undefined close();
|
||||
undefined enqueue(ArrayBufferView chunk);
|
||||
undefined error(optional any e);
|
||||
};
|
||||
|
||||
[Exposed=*]
|
||||
interface ReadableStreamBYOBRequest {
|
||||
readonly attribute ArrayBufferView? view;
|
||||
|
||||
undefined respond([EnforceRange] unsigned long long bytesWritten);
|
||||
undefined respondWithNewView(ArrayBufferView view);
|
||||
};
|
||||
|
||||
[Exposed=*, Transferable]
|
||||
interface WritableStream {
|
||||
constructor(optional object underlyingSink, optional QueuingStrategy strategy = {});
|
||||
|
||||
readonly attribute boolean locked;
|
||||
|
||||
Promise<undefined> abort(optional any reason);
|
||||
Promise<undefined> close();
|
||||
WritableStreamDefaultWriter getWriter();
|
||||
};
|
||||
|
||||
dictionary UnderlyingSink {
|
||||
UnderlyingSinkStartCallback start;
|
||||
UnderlyingSinkWriteCallback write;
|
||||
UnderlyingSinkCloseCallback close;
|
||||
UnderlyingSinkAbortCallback abort;
|
||||
any type;
|
||||
};
|
||||
|
||||
callback UnderlyingSinkStartCallback = any (WritableStreamDefaultController controller);
|
||||
callback UnderlyingSinkWriteCallback = Promise<undefined> (any chunk, WritableStreamDefaultController controller);
|
||||
callback UnderlyingSinkCloseCallback = Promise<undefined> ();
|
||||
callback UnderlyingSinkAbortCallback = Promise<undefined> (optional any reason);
|
||||
|
||||
[Exposed=*]
|
||||
interface WritableStreamDefaultWriter {
|
||||
constructor(WritableStream stream);
|
||||
|
||||
readonly attribute Promise<undefined> closed;
|
||||
readonly attribute unrestricted double? desiredSize;
|
||||
readonly attribute Promise<undefined> ready;
|
||||
|
||||
Promise<undefined> abort(optional any reason);
|
||||
Promise<undefined> close();
|
||||
undefined releaseLock();
|
||||
Promise<undefined> write(optional any chunk);
|
||||
};
|
||||
|
||||
[Exposed=*]
|
||||
interface WritableStreamDefaultController {
|
||||
readonly attribute AbortSignal signal;
|
||||
undefined error(optional any e);
|
||||
};
|
||||
|
||||
[Exposed=*, Transferable]
|
||||
interface TransformStream {
|
||||
constructor(optional object transformer,
|
||||
optional QueuingStrategy writableStrategy = {},
|
||||
optional QueuingStrategy readableStrategy = {});
|
||||
|
||||
readonly attribute ReadableStream readable;
|
||||
readonly attribute WritableStream writable;
|
||||
};
|
||||
|
||||
dictionary Transformer {
|
||||
TransformerStartCallback start;
|
||||
TransformerTransformCallback transform;
|
||||
TransformerFlushCallback flush;
|
||||
TransformerCancelCallback cancel;
|
||||
any readableType;
|
||||
any writableType;
|
||||
};
|
||||
|
||||
callback TransformerStartCallback = any (TransformStreamDefaultController controller);
|
||||
callback TransformerFlushCallback = Promise<undefined> (TransformStreamDefaultController controller);
|
||||
callback TransformerTransformCallback = Promise<undefined> (any chunk, TransformStreamDefaultController controller);
|
||||
callback TransformerCancelCallback = Promise<undefined> (any reason);
|
||||
|
||||
[Exposed=*]
|
||||
interface TransformStreamDefaultController {
|
||||
readonly attribute unrestricted double? desiredSize;
|
||||
|
||||
undefined enqueue(optional any chunk);
|
||||
undefined error(optional any reason);
|
||||
undefined terminate();
|
||||
};
|
||||
|
||||
dictionary QueuingStrategy {
|
||||
unrestricted double highWaterMark;
|
||||
QueuingStrategySize size;
|
||||
};
|
||||
|
||||
callback QueuingStrategySize = unrestricted double (any chunk);
|
||||
|
||||
dictionary QueuingStrategyInit {
|
||||
required unrestricted double highWaterMark;
|
||||
};
|
||||
|
||||
[Exposed=*]
|
||||
interface ByteLengthQueuingStrategy {
|
||||
constructor(QueuingStrategyInit init);
|
||||
|
||||
readonly attribute unrestricted double highWaterMark;
|
||||
readonly attribute Function size;
|
||||
};
|
||||
|
||||
[Exposed=*]
|
||||
interface CountQueuingStrategy {
|
||||
constructor(QueuingStrategyInit init);
|
||||
|
||||
readonly attribute unrestricted double highWaterMark;
|
||||
readonly attribute Function size;
|
||||
};
|
||||
|
||||
interface mixin GenericTransformStream {
|
||||
readonly attribute ReadableStream readable;
|
||||
readonly attribute WritableStream writable;
|
||||
};
|
3824
Tests/LibWeb/Text/input/wpt-import/resources/WebIDLParser.js
Normal file
3824
Tests/LibWeb/Text/input/wpt-import/resources/WebIDLParser.js
Normal file
File diff suppressed because it is too large
Load diff
3568
Tests/LibWeb/Text/input/wpt-import/resources/idlharness.js
Normal file
3568
Tests/LibWeb/Text/input/wpt-import/resources/idlharness.js
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,16 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<meta name="timeout" content="long">
|
||||
<script>
|
||||
self.GLOBAL = {
|
||||
isWindow: function() { return true; },
|
||||
isWorker: function() { return false; },
|
||||
isShadowRealm: function() { return false; },
|
||||
};
|
||||
</script>
|
||||
<script src="../resources/testharness.js"></script>
|
||||
<script src="../resources/testharnessreport.js"></script>
|
||||
<script src="../resources/WebIDLParser.js"></script>
|
||||
<script src="../resources/idlharness.js"></script>
|
||||
<div id=log></div>
|
||||
<script src="../streams/idlharness.any.js"></script>
|
79
Tests/LibWeb/Text/input/wpt-import/streams/idlharness.any.js
Normal file
79
Tests/LibWeb/Text/input/wpt-import/streams/idlharness.any.js
Normal file
|
@ -0,0 +1,79 @@
|
|||
// META: global=window,worker,shadowrealm-in-window
|
||||
// META: script=/resources/WebIDLParser.js
|
||||
// META: script=/resources/idlharness.js
|
||||
// META: timeout=long
|
||||
|
||||
idl_test(
|
||||
['streams'],
|
||||
['dom'], // for AbortSignal
|
||||
async idl_array => {
|
||||
// Empty try/catches ensure that if something isn't implemented (e.g., readable byte streams, or writable streams)
|
||||
// the harness still sets things up correctly. Note that the corresponding interface tests will still fail.
|
||||
|
||||
try {
|
||||
new ReadableStream({
|
||||
start(c) {
|
||||
self.readableStreamDefaultController = c;
|
||||
}
|
||||
});
|
||||
} catch {}
|
||||
|
||||
try {
|
||||
new ReadableStream({
|
||||
start(c) {
|
||||
self.readableByteStreamController = c;
|
||||
},
|
||||
type: 'bytes'
|
||||
});
|
||||
} catch {}
|
||||
|
||||
try {
|
||||
let resolvePullCalledPromise;
|
||||
const pullCalledPromise = new Promise(resolve => {
|
||||
resolvePullCalledPromise = resolve;
|
||||
});
|
||||
const stream = new ReadableStream({
|
||||
pull(c) {
|
||||
self.readableStreamByobRequest = c.byobRequest;
|
||||
resolvePullCalledPromise();
|
||||
},
|
||||
type: 'bytes'
|
||||
});
|
||||
const reader = stream.getReader({ mode: 'byob' });
|
||||
reader.read(new Uint8Array(1));
|
||||
await pullCalledPromise;
|
||||
} catch {}
|
||||
|
||||
try {
|
||||
new WritableStream({
|
||||
start(c) {
|
||||
self.writableStreamDefaultController = c;
|
||||
}
|
||||
});
|
||||
} catch {}
|
||||
|
||||
try {
|
||||
new TransformStream({
|
||||
start(c) {
|
||||
self.transformStreamDefaultController = c;
|
||||
}
|
||||
});
|
||||
} catch {}
|
||||
|
||||
idl_array.add_objects({
|
||||
ReadableStream: ["new ReadableStream()"],
|
||||
ReadableStreamDefaultReader: ["(new ReadableStream()).getReader()"],
|
||||
ReadableStreamBYOBReader: ["(new ReadableStream({ type: 'bytes' })).getReader({ mode: 'byob' })"],
|
||||
ReadableStreamDefaultController: ["self.readableStreamDefaultController"],
|
||||
ReadableByteStreamController: ["self.readableByteStreamController"],
|
||||
ReadableStreamBYOBRequest: ["self.readableStreamByobRequest"],
|
||||
WritableStream: ["new WritableStream()"],
|
||||
WritableStreamDefaultWriter: ["(new WritableStream()).getWriter()"],
|
||||
WritableStreamDefaultController: ["self.writableStreamDefaultController"],
|
||||
TransformStream: ["new TransformStream()"],
|
||||
TransformStreamDefaultController: ["self.transformStreamDefaultController"],
|
||||
ByteLengthQueuingStrategy: ["new ByteLengthQueuingStrategy({ highWaterMark: 5 })"],
|
||||
CountQueuingStrategy: ["new CountQueuingStrategy({ highWaterMark: 5 })"]
|
||||
});
|
||||
}
|
||||
);
|
Loading…
Add table
Reference in a new issue