| Index: sdk/lib/html/dart2js/html_dart2js.dart
|
| diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
|
| index 7c8dd1416a894c29dbde3f74e838e81ba9900388..46ce4d3247452e8ff86ec7711be8a2f7ec7a34c5 100644
|
| --- a/sdk/lib/html/dart2js/html_dart2js.dart
|
| +++ b/sdk/lib/html/dart2js/html_dart2js.dart
|
| @@ -786,12 +786,54 @@ class CanvasElement extends Element native "*HTMLCanvasElement" {
|
| return e;
|
| }
|
|
|
| + /// The height of this canvas element in CSS pixels.
|
| /// @domName HTMLCanvasElement.height; @docsEditable true
|
| int height;
|
|
|
| + /// The width of this canvas element in CSS pixels.
|
| /// @domName HTMLCanvasElement.width; @docsEditable true
|
| int width;
|
|
|
| + /**
|
| + * Returns a data URI containing a representation of the image in the
|
| + * format specified by type (defaults to 'image/png').
|
| + *
|
| + * Data Uri format is as follow `data:[<MIME-type>][;charset=<encoding>][;base64],<data>`
|
| + *
|
| + * Optional parameter [quality] in the range of 0.0 and 1.0 can be used when requesting [type]
|
| + * 'image/jpeg' or 'image/webp'. If [quality] is not passed the default
|
| + * value is used. Note: the default value varies by browser.
|
| + *
|
| + * If the height or width of this canvas element is 0, then 'data:' is returned,
|
| + * representing no data.
|
| + *
|
| + * If the type requested is not 'image/png', and the returned value is
|
| + * 'data:image/png', then the requested type is not supported.
|
| + *
|
| + * Example usage:
|
| + *
|
| + * CanvasElement canvas = new CanvasElement();
|
| + * var ctx = canvas.context2d
|
| + * ..fillStyle = "rgb(200,0,0)"
|
| + * ..fillRect(10, 10, 55, 50);
|
| + * var dataUrl = canvas.toDataURL("image/jpeg", 0.95);
|
| + * // The Data Uri would look similar to
|
| + * // 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA
|
| + * // AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO
|
| + * // 9TXL0Y4OHwAAAABJRU5ErkJggg=='
|
| + * //Create a new image element from the data URI.
|
| + * var img = new ImageElement();
|
| + * img.src = dataUrl;
|
| + * document.body.children.add(img);
|
| + *
|
| + * See also:
|
| + *
|
| + * * [Data URI Scheme](http://en.wikipedia.org/wiki/Data_URI_scheme) from Wikipedia.
|
| + *
|
| + * * [HTMLCanvasElement](https://developer.mozilla.org/en-US/docs/DOM/HTMLCanvasElement) from MDN.
|
| + *
|
| + * * [toDataUrl](http://dev.w3.org/html5/spec/the-canvas-element.html#dom-canvas-todataurl) from W3C.
|
| + */
|
| /// @domName HTMLCanvasElement.toDataURL; @docsEditable true
|
| @JSName('toDataURL')
|
| String toDataUrl(String type, [num quality]) native;
|
| @@ -805,9 +847,47 @@ class CanvasElement extends Element native "*HTMLCanvasElement" {
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
|
|
| +/**
|
| + * An opaque canvas object representing a gradient.
|
| + *
|
| + * Created by calling [createLinearGradient] or [createRadialGradient] on a
|
| + * [CanvasRenderingContext2D] object.
|
| + *
|
| + * Example usage:
|
| + *
|
| + * var canvas = new CanvasElement(width: 600, height: 600);
|
| + * var ctx = canvas.context2d;
|
| + * ctx.clearRect(0, 0, 600, 600);
|
| + * ctx.save();
|
| + * // Create radial gradient.
|
| + * CanvasGradient gradient = ctx.createRadialGradient(0, 0, 0, 0, 0, 600);
|
| + * gradient.addColorStop(0, '#000');
|
| + * gradient.addColorStop(1, 'rgb(255, 255, 255)');
|
| + * // Assign gradients to fill.
|
| + * ctx.fillStyle = gradient;
|
| + * // Draw a rectangle with a gradient fill.
|
| + * ctx.fillRect(0, 0, 600, 600);
|
| + * ctx.save();
|
| + * document.body.children.add(canvas);
|
| + *
|
| + * See also:
|
| + *
|
| + * * [CanvasGradient](https://developer.mozilla.org/en-US/docs/DOM/CanvasGradient) from MDN.
|
| + * * [CanvasGradient](http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasgradient) from whatwg.
|
| + * * [CanvasGradient](http://www.w3.org/TR/2010/WD-2dcontext-20100304/#canvasgradient) from W3C.
|
| + */
|
| /// @domName CanvasGradient; @docsEditable true
|
| class CanvasGradient native "*CanvasGradient" {
|
|
|
| + /**
|
| + * Adds a color stop to this gradient at the offset.
|
| + *
|
| + * The [offset] can range between 0.0 and 1.0.
|
| + *
|
| + * See also:
|
| + *
|
| + * * [Multiple Color Stops](https://developer.mozilla.org/en-US/docs/CSS/linear-gradient#Gradient_with_multiple_color_stops) from MDN.
|
| + */
|
| /// @domName CanvasGradient.addColorStop; @docsEditable true
|
| void addColorStop(num offset, String color) native;
|
| }
|
| @@ -816,6 +896,33 @@ class CanvasGradient native "*CanvasGradient" {
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
|
|
| +/**
|
| + * An opaque object representing a pattern of image, canvas, or video.
|
| + *
|
| + * Created by calling [createPattern] on a [CanvasRenderingContext2D] object.
|
| + *
|
| + * Example usage:
|
| + *
|
| + * var canvas = new CanvasElement(width: 600, height: 600);
|
| + * var ctx = canvas.context2d;
|
| + * var img = new ImageElement();
|
| + * // Image src needs to be loaded before pattern is applied.
|
| + * img.on.load.add((event) {
|
| + * // When the image is loaded, create a pattern
|
| + * // from the ImageElement.
|
| + * CanvasPattern pattern = ctx.createPattern(img, 'repeat');
|
| + * ctx.rect(0, 0, canvas.width, canvas.height);
|
| + * ctx.fillStyle = pattern;
|
| + * ctx.fill();
|
| + * });
|
| + * img.src = "images/foo.jpg";
|
| + * document.body.children.add(canvas);
|
| + *
|
| + * See also:
|
| + * * [CanvasPattern](https://developer.mozilla.org/en-US/docs/DOM/CanvasPattern) from MDN.
|
| + * * [CanvasPattern](http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvaspattern) from whatwg.
|
| + * * [CanvasPattern](http://www.w3.org/TR/2010/WD-2dcontext-20100304/#canvaspattern) from W3C.
|
| + */
|
| /// @domName CanvasPattern; @docsEditable true
|
| class CanvasPattern native "*CanvasPattern" {
|
| }
|
| @@ -824,9 +931,16 @@ class CanvasPattern native "*CanvasPattern" {
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
|
|
| +/**
|
| + * A rendering context for a canvas element.
|
| + *
|
| + * This context is extended by [CanvasRenderingContext2D] and
|
| + * [WebGLRenderingContext].
|
| + */
|
| /// @domName CanvasRenderingContext; @docsEditable true
|
| class CanvasRenderingContext native "*CanvasRenderingContext" {
|
|
|
| + /// Reference to the canvas element to which this context belongs.
|
| /// @domName CanvasRenderingContext.canvas; @docsEditable true
|
| final CanvasElement canvas;
|
| }
|
| @@ -5586,6 +5700,27 @@ class DirectoryReaderSync native "*DirectoryReaderSync" {
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
|
|
| +/**
|
| + * Represents an HTML <div> element.
|
| + *
|
| + * The [DivElement] is a generic container for content and does not have any
|
| + * special significance. It is functionally similar to [SpanElement].
|
| + *
|
| + * The [DivElement] is a block-level element, as opposed to [SpanElement],
|
| + * which is an inline-level element.
|
| + *
|
| + * Example usage:
|
| + *
|
| + * DivElement div = new DivElement();
|
| + * div.text = 'Here's my new DivElem
|
| + * document.body.elements.add(elem);
|
| + *
|
| + * See also:
|
| + *
|
| + * * [HTML <div> element](http://www.w3.org/TR/html-markup/div.html) from W3C.
|
| + * * [Block-level element](http://www.w3.org/TR/CSS2/visuren.html#block-boxes) from W3C.
|
| + * * [Inline-level element](http://www.w3.org/TR/CSS2/visuren.html#inline-boxes) from W3C.
|
| + */
|
| /// @domName HTMLDivElement; @docsEditable true
|
| class DivElement extends Element native "*HTMLDivElement" {
|
|
|
| @@ -5615,6 +5750,7 @@ class Document extends Node native "*Document"
|
| DocumentEvents get on =>
|
| new DocumentEvents(this);
|
|
|
| + /// Moved to [HtmlDocument].
|
| /// @domName Document.body; @docsEditable true
|
| @JSName('body')
|
| Element $dom_body;
|
| @@ -5625,6 +5761,7 @@ class Document extends Node native "*Document"
|
| /// @domName Document.cookie; @docsEditable true
|
| String cookie;
|
|
|
| + /// Returns the [Window] associated with the document.
|
| /// @domName Document.defaultView; @docsEditable true
|
| Window get window => _convertNativeToDart_Window(this._window);
|
| @JSName('defaultView')
|
| @@ -5637,6 +5774,7 @@ class Document extends Node native "*Document"
|
| /// @domName Document.domain; @docsEditable true
|
| final String domain;
|
|
|
| + /// Moved to [HtmlDocument].
|
| /// @domName Document.head; @docsEditable true
|
| @JSName('head')
|
| final HeadElement $dom_head;
|
| @@ -5644,6 +5782,7 @@ class Document extends Node native "*Document"
|
| /// @domName Document.implementation; @docsEditable true
|
| final DomImplementation implementation;
|
|
|
| + /// Moved to [HtmlDocument].
|
| /// @domName Document.lastModified; @docsEditable true
|
| @JSName('lastModified')
|
| final String $dom_lastModified;
|
| @@ -5655,6 +5794,7 @@ class Document extends Node native "*Document"
|
| /// @domName Document.readyState; @docsEditable true
|
| final String readyState;
|
|
|
| + /// Moved to [HtmlDocument].
|
| /// @domName Document.referrer; @docsEditable true
|
| @JSName('referrer')
|
| final String $dom_referrer;
|
| @@ -5663,39 +5803,48 @@ class Document extends Node native "*Document"
|
| @JSName('selectedStylesheetSet')
|
| String $dom_selectedStylesheetSet;
|
|
|
| + /// Moved to [HtmlDocument].
|
| /// @domName Document.styleSheets; @docsEditable true
|
| @JSName('styleSheets')
|
| @Returns('_StyleSheetList') @Creates('_StyleSheetList')
|
| final List<StyleSheet> $dom_styleSheets;
|
|
|
| + /// Moved to [HtmlDocument].
|
| /// @domName Document.title; @docsEditable true
|
| @JSName('title')
|
| String $dom_title;
|
|
|
| + /// Moved to [HtmlDocument].
|
| /// @domName Document.webkitFullscreenElement; @docsEditable true
|
| @JSName('webkitFullscreenElement')
|
| final Element $dom_webkitFullscreenElement;
|
|
|
| + /// Moved to [HtmlDocument].
|
| /// @domName Document.webkitFullscreenEnabled; @docsEditable true
|
| @JSName('webkitFullscreenEnabled')
|
| final bool $dom_webkitFullscreenEnabled;
|
|
|
| + /// Moved to [HtmlDocument].
|
| /// @domName Document.webkitHidden; @docsEditable true
|
| @JSName('webkitHidden')
|
| final bool $dom_webkitHidden;
|
|
|
| + /// Moved to [HtmlDocument].
|
| /// @domName Document.webkitIsFullScreen; @docsEditable true
|
| @JSName('webkitIsFullScreen')
|
| final bool $dom_webkitIsFullScreen;
|
|
|
| + /// Moved to [HtmlDocument].
|
| /// @domName Document.webkitPointerLockElement; @docsEditable true
|
| @JSName('webkitPointerLockElement')
|
| final Element $dom_webkitPointerLockElement;
|
|
|
| + /// Moved to [HtmlDocument].
|
| /// @domName Document.webkitVisibilityState; @docsEditable true
|
| @JSName('webkitVisibilityState')
|
| final String $dom_webkitVisibilityState;
|
|
|
| + /// Use the [Range] constructor instead.
|
| /// @domName Document.caretRangeFromPoint; @docsEditable true
|
| @JSName('caretRangeFromPoint')
|
| Range $dom_caretRangeFromPoint(int x, int y) native;
|
| @@ -5707,6 +5856,7 @@ class Document extends Node native "*Document"
|
| /// @domName Document.createDocumentFragment; @docsEditable true
|
| DocumentFragment createDocumentFragment() native;
|
|
|
| + /// Deprecated: use new Element.tag(tagName) instead.
|
| /// @domName Document.createElement; @docsEditable true
|
| @JSName('createElement')
|
| Element $dom_createElement(String tagName) native;
|
| @@ -5735,10 +5885,12 @@ class Document extends Node native "*Document"
|
| @JSName('createTouch')
|
| Touch _$dom_createTouch_1(LocalWindow window, target, identifier, pageX, pageY, screenX, screenY, webkitRadiusX, webkitRadiusY, webkitRotationAngle, webkitForce) native;
|
|
|
| + /// Use the [TouchList] constructor isntead.
|
| /// @domName Document.createTouchList; @docsEditable true
|
| @JSName('createTouchList')
|
| TouchList $dom_createTouchList() native;
|
|
|
| + /// Moved to [HtmlDocument].
|
| /// @domName Document.elementFromPoint; @docsEditable true
|
| @JSName('elementFromPoint')
|
| Element $dom_elementFromPoint(int x, int y) native;
|
| @@ -5750,6 +5902,7 @@ class Document extends Node native "*Document"
|
| @JSName('getCSSCanvasContext')
|
| CanvasRenderingContext $dom_getCssCanvasContext(String contextId, String name, int width, int height) native;
|
|
|
| + /// Deprecated: use query("#$elementId") instead.
|
| /// @domName Document.getElementById; @docsEditable true
|
| @JSName('getElementById')
|
| Element $dom_getElementById(String elementId) native;
|
| @@ -5784,23 +5937,28 @@ class Document extends Node native "*Document"
|
| /// @domName Document.queryCommandValue; @docsEditable true
|
| String queryCommandValue(String command) native;
|
|
|
| + /// Deprecated: renamed to the shorter name [query].
|
| /// @domName Document.querySelector; @docsEditable true
|
| @JSName('querySelector')
|
| Element $dom_querySelector(String selectors) native;
|
|
|
| + /// Deprecated: use query("#$elementId") instead.
|
| /// @domName Document.querySelectorAll; @docsEditable true
|
| @JSName('querySelectorAll')
|
| @Returns('NodeList') @Creates('NodeList')
|
| List<Node> $dom_querySelectorAll(String selectors) native;
|
|
|
| + /// Moved to [HtmlDocument].
|
| /// @domName Document.webkitCancelFullScreen; @docsEditable true
|
| @JSName('webkitCancelFullScreen')
|
| void $dom_webkitCancelFullScreen() native;
|
|
|
| + /// Moved to [HtmlDocument].
|
| /// @domName Document.webkitExitFullscreen; @docsEditable true
|
| @JSName('webkitExitFullscreen')
|
| void $dom_webkitExitFullscreen() native;
|
|
|
| + /// Moved to [HtmlDocument].
|
| /// @domName Document.webkitExitPointerLock; @docsEditable true
|
| @JSName('webkitExitPointerLock')
|
| void $dom_webkitExitPointerLock() native;
|
| @@ -6444,6 +6602,16 @@ class DomMimeTypeArray implements JavaScriptIndexingBehavior, List<DomMimeType>
|
| throw new StateError("No elements");
|
| }
|
|
|
| + DomMimeType get single {
|
| + if (length == 1) return this[0];
|
| + if (length == 0) throw new StateError("No elements");
|
| + throw new StateError("More than one element");
|
| + }
|
| +
|
| + DomMimeType min([int compare(DomMimeType a, DomMimeType b)]) => _Collections.minInList(this, compare);
|
| +
|
| + DomMimeType max([int compare(DomMimeType a, DomMimeType b)]) => _Collections.maxInList(this, compare);
|
| +
|
| DomMimeType removeAt(int pos) {
|
| throw new UnsupportedError("Cannot removeAt on immutable List.");
|
| }
|
| @@ -6636,6 +6804,16 @@ class DomPluginArray implements JavaScriptIndexingBehavior, List<DomPlugin> nati
|
| throw new StateError("No elements");
|
| }
|
|
|
| + DomPlugin get single {
|
| + if (length == 1) return this[0];
|
| + if (length == 0) throw new StateError("No elements");
|
| + throw new StateError("More than one element");
|
| + }
|
| +
|
| + DomPlugin min([int compare(DomPlugin a, DomPlugin b)]) => _Collections.minInList(this, compare);
|
| +
|
| + DomPlugin max([int compare(DomPlugin a, DomPlugin b)]) => _Collections.maxInList(this, compare);
|
| +
|
| DomPlugin removeAt(int pos) {
|
| throw new UnsupportedError("Cannot removeAt on immutable List.");
|
| }
|
| @@ -6888,6 +7066,16 @@ class DomStringList implements JavaScriptIndexingBehavior, List<String> native "
|
| throw new StateError("No elements");
|
| }
|
|
|
| + String get single {
|
| + if (length == 1) return this[0];
|
| + if (length == 0) throw new StateError("No elements");
|
| + throw new StateError("More than one element");
|
| + }
|
| +
|
| + String min([int compare(String a, String b)]) => _Collections.minInList(this, compare);
|
| +
|
| + String max([int compare(String a, String b)]) => _Collections.maxInList(this, compare);
|
| +
|
| String removeAt(int pos) {
|
| throw new UnsupportedError("Cannot removeAt on immutable List.");
|
| }
|
| @@ -7154,6 +7342,19 @@ class _ChildrenElementList implements List {
|
| if (result == null) throw new StateError("No elements");
|
| return result;
|
| }
|
| +
|
| + Element get single {
|
| + if (length > 1) throw new StateError("More than one element");
|
| + return first;
|
| + }
|
| +
|
| + Element min([int compare(Element a, Element b)]) {
|
| + return _Collections.minInList(this, compare);
|
| + }
|
| +
|
| + Element max([int compare(Element a, Element b)]) {
|
| + return _Collections.maxInList(this, compare);
|
| + }
|
| }
|
|
|
| // TODO(jacobr): this is an inefficient implementation but it is hard to see
|
| @@ -7312,6 +7513,16 @@ class _FrozenElementList implements List {
|
| Element get first => _nodeList.first;
|
|
|
| Element get last => _nodeList.last;
|
| +
|
| + Element get single => _nodeList.single;
|
| +
|
| + Element min([int compare(Element a, Element b)]) {
|
| + return _Collections.minInList(this, compare);
|
| + }
|
| +
|
| + Element max([int compare(Element a, Element b)]) {
|
| + return _Collections.maxInList(this, compare);
|
| + }
|
| }
|
|
|
| class _FrozenElementListIterator implements Iterator<Element> {
|
| @@ -8943,6 +9154,16 @@ class FileList implements JavaScriptIndexingBehavior, List<File> native "*FileLi
|
| throw new StateError("No elements");
|
| }
|
|
|
| + File get single {
|
| + if (length == 1) return this[0];
|
| + if (length == 0) throw new StateError("No elements");
|
| + throw new StateError("More than one element");
|
| + }
|
| +
|
| + File min([int compare(File a, File b)]) => _Collections.minInList(this, compare);
|
| +
|
| + File max([int compare(File a, File b)]) => _Collections.maxInList(this, compare);
|
| +
|
| File removeAt(int pos) {
|
| throw new UnsupportedError("Cannot removeAt on immutable List.");
|
| }
|
| @@ -9352,6 +9573,16 @@ class Float32Array extends ArrayBufferView implements JavaScriptIndexingBehavior
|
| throw new StateError("No elements");
|
| }
|
|
|
| + num get single {
|
| + if (length == 1) return this[0];
|
| + if (length == 0) throw new StateError("No elements");
|
| + throw new StateError("More than one element");
|
| + }
|
| +
|
| + num min([int compare(num a, num b)]) => _Collections.minInList(this, compare);
|
| +
|
| + num max([int compare(num a, num b)]) => _Collections.maxInList(this, compare);
|
| +
|
| num removeAt(int pos) {
|
| throw new UnsupportedError("Cannot removeAt on immutable List.");
|
| }
|
| @@ -9513,6 +9744,16 @@ class Float64Array extends ArrayBufferView implements JavaScriptIndexingBehavior
|
| throw new StateError("No elements");
|
| }
|
|
|
| + num get single {
|
| + if (length == 1) return this[0];
|
| + if (length == 0) throw new StateError("No elements");
|
| + throw new StateError("More than one element");
|
| + }
|
| +
|
| + num min([int compare(num a, num b)]) => _Collections.minInList(this, compare);
|
| +
|
| + num max([int compare(num a, num b)]) => _Collections.maxInList(this, compare);
|
| +
|
| num removeAt(int pos) {
|
| throw new UnsupportedError("Cannot removeAt on immutable List.");
|
| }
|
| @@ -10001,6 +10242,16 @@ class HtmlAllCollection implements JavaScriptIndexingBehavior, List<Node> native
|
| throw new StateError("No elements");
|
| }
|
|
|
| + Node get single {
|
| + if (length == 1) return this[0];
|
| + if (length == 0) throw new StateError("No elements");
|
| + throw new StateError("More than one element");
|
| + }
|
| +
|
| + Node min([int compare(Node a, Node b)]) => _Collections.minInList(this, compare);
|
| +
|
| + Node max([int compare(Node a, Node b)]) => _Collections.maxInList(this, compare);
|
| +
|
| Node removeAt(int pos) {
|
| throw new UnsupportedError("Cannot removeAt on immutable List.");
|
| }
|
| @@ -10157,6 +10408,16 @@ class HtmlCollection implements JavaScriptIndexingBehavior, List<Node> native "*
|
| throw new StateError("No elements");
|
| }
|
|
|
| + Node get single {
|
| + if (length == 1) return this[0];
|
| + if (length == 0) throw new StateError("No elements");
|
| + throw new StateError("More than one element");
|
| + }
|
| +
|
| + Node min([int compare(Node a, Node b)]) => _Collections.minInList(this, compare);
|
| +
|
| + Node max([int compare(Node a, Node b)]) => _Collections.maxInList(this, compare);
|
| +
|
| Node removeAt(int pos) {
|
| throw new UnsupportedError("Cannot removeAt on immutable List.");
|
| }
|
| @@ -10379,9 +10640,28 @@ class HttpRequest extends EventTarget native "*XMLHttpRequest" {
|
| onComplete);
|
|
|
|
|
| + /**
|
| + * General constructor for any type of request (GET, POST, etc).
|
| + *
|
| + * This call is used in conjunction with [open]:
|
| + *
|
| + * var request = new HttpRequest();
|
| + * request.open('GET', 'http://dartlang.org')
|
| + * request.on.load.add((event) => print('Request complete'));
|
| + *
|
| + * is the (more verbose) equivalent of
|
| + *
|
| + * var request = new HttpRequest.get('http://dartlang.org',
|
| + * (event) => print('Request complete'));
|
| + */
|
| ///@docsEditable true
|
| factory HttpRequest() => _HttpRequestFactoryProvider.createHttpRequest();
|
|
|
| + /**
|
| + * Get the set of [HttpRequestEvents] that this request can respond to.
|
| + * Usually used when adding an EventListener, such as in
|
| + * `document.window.on.keyDown.add((e) => print('keydown happened'))`.
|
| + */
|
| /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent; @docsEditable true
|
| HttpRequestEvents get on =>
|
| new HttpRequestEvents(this);
|
| @@ -10396,35 +10676,119 @@ class HttpRequest extends EventTarget native "*XMLHttpRequest" {
|
|
|
| static const int UNSENT = 0;
|
|
|
| + /**
|
| + * Indicator of the current state of the request:
|
| + *
|
| + * <table>
|
| + * <tr>
|
| + * <td>Value</td>
|
| + * <td>State</td>
|
| + * <td>Meaning</td>
|
| + * </tr>
|
| + * <tr>
|
| + * <td>0</td>
|
| + * <td>unsent</td>
|
| + * <td><code>open()</code> has not yet been called</td>
|
| + * </tr>
|
| + * <tr>
|
| + * <td>1</td>
|
| + * <td>opened</td>
|
| + * <td><code>send()</code> has not yet been called</td>
|
| + * </tr>
|
| + * <tr>
|
| + * <td>2</td>
|
| + * <td>headers received</td>
|
| + * <td><code>sent()</code> has been called; response headers and <code>status</code> are available</td>
|
| + * </tr>
|
| + * <tr>
|
| + * <td>3</td> <td>loading</td> <td><code>responseText</code> holds some data</td>
|
| + * </tr>
|
| + * <tr>
|
| + * <td>4</td> <td>done</td> <td>request is complete</td>
|
| + * </tr>
|
| + * </table>
|
| + */
|
| /// @domName XMLHttpRequest.readyState; @docsEditable true
|
| final int readyState;
|
|
|
| + /**
|
| + * The data received as a reponse from the request.
|
| + *
|
| + * The data could be in the
|
| + * form of a [String], [ArrayBuffer], [Document], [Blob], or json (also a
|
| + * [String]). `null` indicates request failure.
|
| + */
|
| /// @domName XMLHttpRequest.response; @docsEditable true
|
| @Creates('ArrayBuffer|Blob|Document|=Object|=List|String|num')
|
| final Object response;
|
|
|
| + /**
|
| + * The response in string form or null on failure.
|
| + */
|
| /// @domName XMLHttpRequest.responseText; @docsEditable true
|
| final String responseText;
|
|
|
| + /**
|
| + * [String] telling the server the desired response format.
|
| + *
|
| + * Default is `String`.
|
| + * Other options are one of 'arraybuffer', 'blob', 'document', 'json',
|
| + * 'text'. Some newer browsers will throw NS_ERROR_DOM_INVALID_ACCESS_ERR if
|
| + * `responseType` is set while performing a synchronous request.
|
| + *
|
| + * See also: [MDN responseType](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#responseType)
|
| + */
|
| /// @domName XMLHttpRequest.responseType; @docsEditable true
|
| String responseType;
|
|
|
| + /**
|
| + * The request response, or null on failure.
|
| + *
|
| + * The response is processed as
|
| + * `text/xml` stream, unless responseType = 'document' and the request is
|
| + * synchronous.
|
| + */
|
| /// @domName XMLHttpRequest.responseXML; @docsEditable true
|
| @JSName('responseXML')
|
| final Document responseXml;
|
|
|
| + /**
|
| + * The http result code from the request (200, 404, etc).
|
| + * See also: [Http Status Codes](http://en.wikipedia.org/wiki/List_of_HTTP_status_codes)
|
| + */
|
| /// @domName XMLHttpRequest.status; @docsEditable true
|
| final int status;
|
|
|
| + /**
|
| + * The request response string (such as "200 OK").
|
| + * See also: [Http Status Codes](http://en.wikipedia.org/wiki/List_of_HTTP_status_codes)
|
| + */
|
| /// @domName XMLHttpRequest.statusText; @docsEditable true
|
| final String statusText;
|
|
|
| + /**
|
| + * [EventTarget] that can hold listeners to track the progress of the request.
|
| + * The events fired will be members of [HttpRequestUploadEvents].
|
| + */
|
| /// @domName XMLHttpRequest.upload; @docsEditable true
|
| final HttpRequestUpload upload;
|
|
|
| + /**
|
| + * True if cross-site requests should use credentials such as cookies
|
| + * or authorization headers; false otherwise.
|
| + *
|
| + * This value is ignored for same-site requests.
|
| + */
|
| /// @domName XMLHttpRequest.withCredentials; @docsEditable true
|
| bool withCredentials;
|
|
|
| + /**
|
| + * Stop the current request.
|
| + *
|
| + * The request can only be stopped if readyState is `HEADERS_RECIEVED` or
|
| + * `LOADING`. If this method is not in the process of being sent, the method
|
| + * has no effect.
|
| + */
|
| /// @domName XMLHttpRequest.abort; @docsEditable true
|
| void abort() native;
|
|
|
| @@ -10436,15 +10800,48 @@ class HttpRequest extends EventTarget native "*XMLHttpRequest" {
|
| @JSName('dispatchEvent')
|
| bool $dom_dispatchEvent(Event evt) native;
|
|
|
| + /**
|
| + * Retrieve all the response headers from a request.
|
| + *
|
| + * `null` if no headers have been received. For multipart requests,
|
| + * `getAllResponseHeaders` will return the response headers for the current
|
| + * part of the request.
|
| + *
|
| + * See also [HTTP response headers](http://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Responses)
|
| + * for a list of common response headers.
|
| + */
|
| /// @domName XMLHttpRequest.getAllResponseHeaders; @docsEditable true
|
| String getAllResponseHeaders() native;
|
|
|
| + /**
|
| + * Return the response header named `header`, or `null` if not found.
|
| + *
|
| + * See also [HTTP response headers](http://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Responses)
|
| + * for a list of common response headers.
|
| + */
|
| /// @domName XMLHttpRequest.getResponseHeader; @docsEditable true
|
| String getResponseHeader(String header) native;
|
|
|
| + /**
|
| + * Specify the desired `url`, and `method` to use in making the request.
|
| + *
|
| + * By default the request is done asyncronously, with no user or password
|
| + * authentication information. If `async` is false, the request will be send
|
| + * synchronously.
|
| + *
|
| + * Calling `open` again on a currently active request is equivalent to
|
| + * calling `abort`.
|
| + */
|
| /// @domName XMLHttpRequest.open; @docsEditable true
|
| void open(String method, String url, [bool async, String user, String password]) native;
|
|
|
| + /**
|
| + * Specify a particular MIME type (such as `text/xml`) desired for the
|
| + * response.
|
| + *
|
| + * This value must be set before the request has been sent. See also the list
|
| + * of [common MIME types](http://en.wikipedia.org/wiki/Internet_media_type#List_of_common_media_types)
|
| + */
|
| /// @domName XMLHttpRequest.overrideMimeType; @docsEditable true
|
| void overrideMimeType(String override) native;
|
|
|
| @@ -10452,37 +10849,89 @@ class HttpRequest extends EventTarget native "*XMLHttpRequest" {
|
| @JSName('removeEventListener')
|
| void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
|
|
|
| + /**
|
| + * Send the request with any given `data`.
|
| + *
|
| + * See also:
|
| + * [send() docs](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#send())
|
| + * from MDN.
|
| + */
|
| /// @domName XMLHttpRequest.send; @docsEditable true
|
| void send([data]) native;
|
|
|
| + /** Sets HTTP `header` to `value`. */
|
| /// @domName XMLHttpRequest.setRequestHeader; @docsEditable true
|
| void setRequestHeader(String header, String value) native;
|
|
|
| }
|
|
|
| +/**
|
| + * A class that supports listening for and dispatching events that can fire when
|
| + * making an HTTP request.
|
| + *
|
| + * Here's an example of adding an event handler that executes once an HTTP
|
| + * request has fully loaded:
|
| + *
|
| + * httpRequest.on.loadEnd.add((e) => myCustomLoadEndHandler(e));
|
| + *
|
| + * Each property of this class is a read-only pointer to an [EventListenerList].
|
| + * That list holds all of the [EventListener]s that have registered for that
|
| + * particular type of event that fires from an HttpRequest.
|
| + */
|
| /// @docsEditable true
|
| class HttpRequestEvents extends Events {
|
| /// @docsEditable true
|
| HttpRequestEvents(EventTarget _ptr) : super(_ptr);
|
|
|
| + /**
|
| + * Event listeners to be notified when request has been aborted,
|
| + * generally due to calling `httpRequest.abort()`.
|
| + */
|
| /// @docsEditable true
|
| EventListenerList get abort => this['abort'];
|
|
|
| + /**
|
| + * Event listeners to be notified when a request has failed, such as when a
|
| + * cross-domain error occurred or the file wasn't found on the server.
|
| + */
|
| /// @docsEditable true
|
| EventListenerList get error => this['error'];
|
|
|
| + /**
|
| + * Event listeners to be notified once the request has completed
|
| + * *successfully*.
|
| + */
|
| /// @docsEditable true
|
| EventListenerList get load => this['load'];
|
|
|
| + /**
|
| + * Event listeners to be notified once the request has completed (on
|
| + * either success or failure).
|
| + */
|
| /// @docsEditable true
|
| EventListenerList get loadEnd => this['loadend'];
|
|
|
| + /**
|
| + * Event listeners to be notified when the request starts, once
|
| + * `httpRequest.send()` has been called.
|
| + */
|
| /// @docsEditable true
|
| EventListenerList get loadStart => this['loadstart'];
|
|
|
| + /**
|
| + * Event listeners to be notified when data for the request
|
| + * is being sent or loaded.
|
| + *
|
| + * Progress events are fired every 50ms or for every byte transmitted,
|
| + * whichever is less frequent.
|
| + */
|
| /// @docsEditable true
|
| EventListenerList get progress => this['progress'];
|
|
|
| + /**
|
| + * Event listeners to be notified every time the [HttpRequest]
|
| + * object's `readyState` changes values.
|
| + */
|
| /// @docsEditable true
|
| EventListenerList get readyStateChange => this['readystatechange'];
|
| }
|
| @@ -11561,6 +12010,16 @@ class Int16Array extends ArrayBufferView implements JavaScriptIndexingBehavior,
|
| throw new StateError("No elements");
|
| }
|
|
|
| + int get single {
|
| + if (length == 1) return this[0];
|
| + if (length == 0) throw new StateError("No elements");
|
| + throw new StateError("More than one element");
|
| + }
|
| +
|
| + int min([int compare(int a, int b)]) => _Collections.minInList(this, compare);
|
| +
|
| + int max([int compare(int a, int b)]) => _Collections.maxInList(this, compare);
|
| +
|
| int removeAt(int pos) {
|
| throw new UnsupportedError("Cannot removeAt on immutable List.");
|
| }
|
| @@ -11722,6 +12181,16 @@ class Int32Array extends ArrayBufferView implements JavaScriptIndexingBehavior,
|
| throw new StateError("No elements");
|
| }
|
|
|
| + int get single {
|
| + if (length == 1) return this[0];
|
| + if (length == 0) throw new StateError("No elements");
|
| + throw new StateError("More than one element");
|
| + }
|
| +
|
| + int min([int compare(int a, int b)]) => _Collections.minInList(this, compare);
|
| +
|
| + int max([int compare(int a, int b)]) => _Collections.maxInList(this, compare);
|
| +
|
| int removeAt(int pos) {
|
| throw new UnsupportedError("Cannot removeAt on immutable List.");
|
| }
|
| @@ -11883,6 +12352,16 @@ class Int8Array extends ArrayBufferView implements JavaScriptIndexingBehavior, L
|
| throw new StateError("No elements");
|
| }
|
|
|
| + int get single {
|
| + if (length == 1) return this[0];
|
| + if (length == 0) throw new StateError("No elements");
|
| + throw new StateError("More than one element");
|
| + }
|
| +
|
| + int min([int compare(int a, int b)]) => _Collections.minInList(this, compare);
|
| +
|
| + int max([int compare(int a, int b)]) => _Collections.maxInList(this, compare);
|
| +
|
| int removeAt(int pos) {
|
| throw new UnsupportedError("Cannot removeAt on immutable List.");
|
| }
|
| @@ -13664,6 +14143,16 @@ class MemoryInfo native "*MemoryInfo" {
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
|
|
| +/**
|
| + * An HTML <menu> element.
|
| + *
|
| + * A <menu> element represents an unordered list of menu commands.
|
| + *
|
| + * See also:
|
| + *
|
| + * * [Menu Element](https://developer.mozilla.org/en-US/docs/HTML/Element/menu) from MDN.
|
| + * * [Menu Element](http://www.w3.org/TR/html5/the-menu-element.html#the-menu-element) from the W3C.
|
| + */
|
| /// @domName HTMLMenuElement; @docsEditable true
|
| class MenuElement extends Element native "*HTMLMenuElement" {
|
|
|
| @@ -14263,6 +14752,16 @@ class NamedNodeMap implements JavaScriptIndexingBehavior, List<Node> native "*Na
|
| throw new StateError("No elements");
|
| }
|
|
|
| + Node get single {
|
| + if (length == 1) return this[0];
|
| + if (length == 0) throw new StateError("No elements");
|
| + throw new StateError("More than one element");
|
| + }
|
| +
|
| + Node min([int compare(Node a, Node b)]) => _Collections.minInList(this, compare);
|
| +
|
| + Node max([int compare(Node a, Node b)]) => _Collections.maxInList(this, compare);
|
| +
|
| Node removeAt(int pos) {
|
| throw new UnsupportedError("Cannot removeAt on immutable List.");
|
| }
|
| @@ -14448,6 +14947,20 @@ class _ChildNodeListLazy implements List {
|
| if (result == null) throw new StateError("No elements");
|
| return result;
|
| }
|
| + Node get single {
|
| + int l = this.length;
|
| + if (l == 0) throw new StateError("No elements");
|
| + if (l > 1) throw new StateError("More than one element");
|
| + return JS('Node', '#.firstChild', _this);
|
| + }
|
| +
|
| + Node min([int compare(Node a, Node b)]) {
|
| + return _Collections.minInList(this, compare);
|
| + }
|
| +
|
| + Node max([int compare(Node a, Node b)]) {
|
| + return _Collections.maxInList(this, compare);
|
| + }
|
|
|
| void add(Node value) {
|
| _this.$dom_appendChild(value);
|
| @@ -14961,6 +15474,16 @@ class NodeList implements JavaScriptIndexingBehavior, List<Node> native "*NodeLi
|
| throw new StateError("No elements");
|
| }
|
|
|
| + Node get single {
|
| + if (length == 1) return this[0];
|
| + if (length == 0) throw new StateError("No elements");
|
| + throw new StateError("More than one element");
|
| + }
|
| +
|
| + Node min([int compare(Node a, Node b)]) => _Collections.minInList(this, compare);
|
| +
|
| + Node max([int compare(Node a, Node b)]) => _Collections.maxInList(this, compare);
|
| +
|
| Node removeAt(int pos) {
|
| throw new UnsupportedError("Cannot removeAt on immutable List.");
|
| }
|
| @@ -16965,6 +17488,16 @@ class SourceBufferList extends EventTarget implements JavaScriptIndexingBehavior
|
| throw new StateError("No elements");
|
| }
|
|
|
| + SourceBuffer get single {
|
| + if (length == 1) return this[0];
|
| + if (length == 0) throw new StateError("No elements");
|
| + throw new StateError("More than one element");
|
| + }
|
| +
|
| + SourceBuffer min([int compare(SourceBuffer a, SourceBuffer b)]) => _Collections.minInList(this, compare);
|
| +
|
| + SourceBuffer max([int compare(SourceBuffer a, SourceBuffer b)]) => _Collections.maxInList(this, compare);
|
| +
|
| SourceBuffer removeAt(int pos) {
|
| throw new UnsupportedError("Cannot removeAt on immutable List.");
|
| }
|
| @@ -17177,6 +17710,16 @@ class SpeechGrammarList implements JavaScriptIndexingBehavior, List<SpeechGramma
|
| throw new StateError("No elements");
|
| }
|
|
|
| + SpeechGrammar get single {
|
| + if (length == 1) return this[0];
|
| + if (length == 0) throw new StateError("No elements");
|
| + throw new StateError("More than one element");
|
| + }
|
| +
|
| + SpeechGrammar min([int compare(SpeechGrammar a, SpeechGrammar b)]) => _Collections.minInList(this, compare);
|
| +
|
| + SpeechGrammar max([int compare(SpeechGrammar a, SpeechGrammar b)]) => _Collections.maxInList(this, compare);
|
| +
|
| SpeechGrammar removeAt(int pos) {
|
| throw new UnsupportedError("Cannot removeAt on immutable List.");
|
| }
|
| @@ -17610,6 +18153,16 @@ class SqlResultSetRowList implements JavaScriptIndexingBehavior, List<Map> nativ
|
| throw new StateError("No elements");
|
| }
|
|
|
| + Map get single {
|
| + if (length == 1) return this[0];
|
| + if (length == 0) throw new StateError("No elements");
|
| + throw new StateError("More than one element");
|
| + }
|
| +
|
| + Map min([int compare(Map a, Map b)]) => _Collections.minInList(this, compare);
|
| +
|
| + Map max([int compare(Map a, Map b)]) => _Collections.maxInList(this, compare);
|
| +
|
| Map removeAt(int pos) {
|
| throw new UnsupportedError("Cannot removeAt on immutable List.");
|
| }
|
| @@ -18548,6 +19101,16 @@ class TextTrackCueList implements List<TextTrackCue>, JavaScriptIndexingBehavior
|
| throw new StateError("No elements");
|
| }
|
|
|
| + TextTrackCue get single {
|
| + if (length == 1) return this[0];
|
| + if (length == 0) throw new StateError("No elements");
|
| + throw new StateError("More than one element");
|
| + }
|
| +
|
| + TextTrackCue min([int compare(TextTrackCue a, TextTrackCue b)]) => _Collections.minInList(this, compare);
|
| +
|
| + TextTrackCue max([int compare(TextTrackCue a, TextTrackCue b)]) => _Collections.maxInList(this, compare);
|
| +
|
| TextTrackCue removeAt(int pos) {
|
| throw new UnsupportedError("Cannot removeAt on immutable List.");
|
| }
|
| @@ -18704,6 +19267,16 @@ class TextTrackList extends EventTarget implements JavaScriptIndexingBehavior, L
|
| throw new StateError("No elements");
|
| }
|
|
|
| + TextTrack get single {
|
| + if (length == 1) return this[0];
|
| + if (length == 0) throw new StateError("No elements");
|
| + throw new StateError("More than one element");
|
| + }
|
| +
|
| + TextTrack min([int compare(TextTrack a, TextTrack b)]) => _Collections.minInList(this, compare);
|
| +
|
| + TextTrack max([int compare(TextTrack a, TextTrack b)]) => _Collections.maxInList(this, compare);
|
| +
|
| TextTrack removeAt(int pos) {
|
| throw new UnsupportedError("Cannot removeAt on immutable List.");
|
| }
|
| @@ -18989,6 +19562,16 @@ class TouchList implements JavaScriptIndexingBehavior, List<Touch> native "*Touc
|
| throw new StateError("No elements");
|
| }
|
|
|
| + Touch get single {
|
| + if (length == 1) return this[0];
|
| + if (length == 0) throw new StateError("No elements");
|
| + throw new StateError("More than one element");
|
| + }
|
| +
|
| + Touch min([int compare(Touch a, Touch b)]) => _Collections.minInList(this, compare);
|
| +
|
| + Touch max([int compare(Touch a, Touch b)]) => _Collections.maxInList(this, compare);
|
| +
|
| Touch removeAt(int pos) {
|
| throw new UnsupportedError("Cannot removeAt on immutable List.");
|
| }
|
| @@ -19332,6 +19915,16 @@ class Uint16Array extends ArrayBufferView implements JavaScriptIndexingBehavior,
|
| throw new StateError("No elements");
|
| }
|
|
|
| + int get single {
|
| + if (length == 1) return this[0];
|
| + if (length == 0) throw new StateError("No elements");
|
| + throw new StateError("More than one element");
|
| + }
|
| +
|
| + int min([int compare(int a, int b)]) => _Collections.minInList(this, compare);
|
| +
|
| + int max([int compare(int a, int b)]) => _Collections.maxInList(this, compare);
|
| +
|
| int removeAt(int pos) {
|
| throw new UnsupportedError("Cannot removeAt on immutable List.");
|
| }
|
| @@ -19493,6 +20086,16 @@ class Uint32Array extends ArrayBufferView implements JavaScriptIndexingBehavior,
|
| throw new StateError("No elements");
|
| }
|
|
|
| + int get single {
|
| + if (length == 1) return this[0];
|
| + if (length == 0) throw new StateError("No elements");
|
| + throw new StateError("More than one element");
|
| + }
|
| +
|
| + int min([int compare(int a, int b)]) => _Collections.minInList(this, compare);
|
| +
|
| + int max([int compare(int a, int b)]) => _Collections.maxInList(this, compare);
|
| +
|
| int removeAt(int pos) {
|
| throw new UnsupportedError("Cannot removeAt on immutable List.");
|
| }
|
| @@ -19654,6 +20257,16 @@ class Uint8Array extends ArrayBufferView implements JavaScriptIndexingBehavior,
|
| throw new StateError("No elements");
|
| }
|
|
|
| + int get single {
|
| + if (length == 1) return this[0];
|
| + if (length == 0) throw new StateError("No elements");
|
| + throw new StateError("More than one element");
|
| + }
|
| +
|
| + int min([int compare(int a, int b)]) => _Collections.minInList(this, compare);
|
| +
|
| + int max([int compare(int a, int b)]) => _Collections.maxInList(this, compare);
|
| +
|
| int removeAt(int pos) {
|
| throw new UnsupportedError("Cannot removeAt on immutable List.");
|
| }
|
| @@ -21908,6 +22521,16 @@ class _ClientRectList implements JavaScriptIndexingBehavior, List<ClientRect> na
|
| throw new StateError("No elements");
|
| }
|
|
|
| + ClientRect get single {
|
| + if (length == 1) return this[0];
|
| + if (length == 0) throw new StateError("No elements");
|
| + throw new StateError("More than one element");
|
| + }
|
| +
|
| + ClientRect min([int compare(ClientRect a, ClientRect b)]) => _Collections.minInList(this, compare);
|
| +
|
| + ClientRect max([int compare(ClientRect a, ClientRect b)]) => _Collections.maxInList(this, compare);
|
| +
|
| ClientRect removeAt(int pos) {
|
| throw new UnsupportedError("Cannot removeAt on immutable List.");
|
| }
|
| @@ -22066,6 +22689,16 @@ class _CssRuleList implements JavaScriptIndexingBehavior, List<CssRule> native "
|
| throw new StateError("No elements");
|
| }
|
|
|
| + CssRule get single {
|
| + if (length == 1) return this[0];
|
| + if (length == 0) throw new StateError("No elements");
|
| + throw new StateError("More than one element");
|
| + }
|
| +
|
| + CssRule min([int compare(CssRule a, CssRule b)]) => _Collections.minInList(this, compare);
|
| +
|
| + CssRule max([int compare(CssRule a, CssRule b)]) => _Collections.maxInList(this, compare);
|
| +
|
| CssRule removeAt(int pos) {
|
| throw new UnsupportedError("Cannot removeAt on immutable List.");
|
| }
|
| @@ -22215,6 +22848,16 @@ class _CssValueList extends CssValue implements List<CssValue>, JavaScriptIndexi
|
| throw new StateError("No elements");
|
| }
|
|
|
| + CssValue get single {
|
| + if (length == 1) return this[0];
|
| + if (length == 0) throw new StateError("No elements");
|
| + throw new StateError("More than one element");
|
| + }
|
| +
|
| + CssValue min([int compare(CssValue a, CssValue b)]) => _Collections.minInList(this, compare);
|
| +
|
| + CssValue max([int compare(CssValue a, CssValue b)]) => _Collections.maxInList(this, compare);
|
| +
|
| CssValue removeAt(int pos) {
|
| throw new UnsupportedError("Cannot removeAt on immutable List.");
|
| }
|
| @@ -22390,6 +23033,16 @@ class _EntryArray implements JavaScriptIndexingBehavior, List<Entry> native "*En
|
| throw new StateError("No elements");
|
| }
|
|
|
| + Entry get single {
|
| + if (length == 1) return this[0];
|
| + if (length == 0) throw new StateError("No elements");
|
| + throw new StateError("More than one element");
|
| + }
|
| +
|
| + Entry min([int compare(Entry a, Entry b)]) => _Collections.minInList(this, compare);
|
| +
|
| + Entry max([int compare(Entry a, Entry b)]) => _Collections.maxInList(this, compare);
|
| +
|
| Entry removeAt(int pos) {
|
| throw new UnsupportedError("Cannot removeAt on immutable List.");
|
| }
|
| @@ -22539,6 +23192,16 @@ class _EntryArraySync implements JavaScriptIndexingBehavior, List<EntrySync> nat
|
| throw new StateError("No elements");
|
| }
|
|
|
| + EntrySync get single {
|
| + if (length == 1) return this[0];
|
| + if (length == 0) throw new StateError("No elements");
|
| + throw new StateError("More than one element");
|
| + }
|
| +
|
| + EntrySync min([int compare(EntrySync a, EntrySync b)]) => _Collections.minInList(this, compare);
|
| +
|
| + EntrySync max([int compare(EntrySync a, EntrySync b)]) => _Collections.maxInList(this, compare);
|
| +
|
| EntrySync removeAt(int pos) {
|
| throw new UnsupportedError("Cannot removeAt on immutable List.");
|
| }
|
| @@ -22726,6 +23389,16 @@ class _GamepadList implements JavaScriptIndexingBehavior, List<Gamepad> native "
|
| throw new StateError("No elements");
|
| }
|
|
|
| + Gamepad get single {
|
| + if (length == 1) return this[0];
|
| + if (length == 0) throw new StateError("No elements");
|
| + throw new StateError("More than one element");
|
| + }
|
| +
|
| + Gamepad min([int compare(Gamepad a, Gamepad b)]) => _Collections.minInList(this, compare);
|
| +
|
| + Gamepad max([int compare(Gamepad a, Gamepad b)]) => _Collections.maxInList(this, compare);
|
| +
|
| Gamepad removeAt(int pos) {
|
| throw new UnsupportedError("Cannot removeAt on immutable List.");
|
| }
|
| @@ -22928,6 +23601,16 @@ class _MediaStreamList implements JavaScriptIndexingBehavior, List<MediaStream>
|
| throw new StateError("No elements");
|
| }
|
|
|
| + MediaStream get single {
|
| + if (length == 1) return this[0];
|
| + if (length == 0) throw new StateError("No elements");
|
| + throw new StateError("More than one element");
|
| + }
|
| +
|
| + MediaStream min([int compare(MediaStream a, MediaStream b)]) => _Collections.minInList(this, compare);
|
| +
|
| + MediaStream max([int compare(MediaStream a, MediaStream b)]) => _Collections.maxInList(this, compare);
|
| +
|
| MediaStream removeAt(int pos) {
|
| throw new UnsupportedError("Cannot removeAt on immutable List.");
|
| }
|
| @@ -23230,6 +23913,16 @@ class _SpeechInputResultList implements JavaScriptIndexingBehavior, List<SpeechI
|
| throw new StateError("No elements");
|
| }
|
|
|
| + SpeechInputResult get single {
|
| + if (length == 1) return this[0];
|
| + if (length == 0) throw new StateError("No elements");
|
| + throw new StateError("More than one element");
|
| + }
|
| +
|
| + SpeechInputResult min([int compare(SpeechInputResult a, SpeechInputResult b)]) => _Collections.minInList(this, compare);
|
| +
|
| + SpeechInputResult max([int compare(SpeechInputResult a, SpeechInputResult b)]) => _Collections.maxInList(this, compare);
|
| +
|
| SpeechInputResult removeAt(int pos) {
|
| throw new UnsupportedError("Cannot removeAt on immutable List.");
|
| }
|
| @@ -23388,6 +24081,16 @@ class _SpeechRecognitionResultList implements JavaScriptIndexingBehavior, List<S
|
| throw new StateError("No elements");
|
| }
|
|
|
| + SpeechRecognitionResult get single {
|
| + if (length == 1) return this[0];
|
| + if (length == 0) throw new StateError("No elements");
|
| + throw new StateError("More than one element");
|
| + }
|
| +
|
| + SpeechRecognitionResult min([int compare(SpeechRecognitionResult a, SpeechRecognitionResult b)]) => _Collections.minInList(this, compare);
|
| +
|
| + SpeechRecognitionResult max([int compare(SpeechRecognitionResult a, SpeechRecognitionResult b)]) => _Collections.maxInList(this, compare);
|
| +
|
| SpeechRecognitionResult removeAt(int pos) {
|
| throw new UnsupportedError("Cannot removeAt on immutable List.");
|
| }
|
| @@ -23537,6 +24240,16 @@ class _StyleSheetList implements JavaScriptIndexingBehavior, List<StyleSheet> na
|
| throw new StateError("No elements");
|
| }
|
|
|
| + StyleSheet get single {
|
| + if (length == 1) return this[0];
|
| + if (length == 0) throw new StateError("No elements");
|
| + throw new StateError("More than one element");
|
| + }
|
| +
|
| + StyleSheet min([int compare(StyleSheet a, StyleSheet b)]) => _Collections.minInList(this, compare);
|
| +
|
| + StyleSheet max([int compare(StyleSheet a, StyleSheet b)]) => _Collections.maxInList(this, compare);
|
| +
|
| StyleSheet removeAt(int pos) {
|
| throw new UnsupportedError("Cannot removeAt on immutable List.");
|
| }
|
| @@ -23710,6 +24423,16 @@ class _WebKitAnimationList implements JavaScriptIndexingBehavior, List<Animation
|
| throw new StateError("No elements");
|
| }
|
|
|
| + Animation get single {
|
| + if (length == 1) return this[0];
|
| + if (length == 0) throw new StateError("No elements");
|
| + throw new StateError("More than one element");
|
| + }
|
| +
|
| + Animation min([int compare(Animation a, Animation b)]) => _Collections.minInList(this, compare);
|
| +
|
| + Animation max([int compare(Animation a, Animation b)]) => _Collections.maxInList(this, compare);
|
| +
|
| Animation removeAt(int pos) {
|
| throw new UnsupportedError("Cannot removeAt on immutable List.");
|
| }
|
|
|