| 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 1c4ad76d280122486a9d52f86109a09bd4691ff4..3f5c5c1299bfd152cac155fb03dc661fbba45ccf 100644
|
| --- a/sdk/lib/html/dart2js/html_dart2js.dart
|
| +++ b/sdk/lib/html/dart2js/html_dart2js.dart
|
| @@ -6339,6 +6339,27 @@ class DirectoryReaderSync native "*DirectoryReaderSync" {
|
|
|
|
|
| @DocsEditable
|
| +/**
|
| + * 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')
|
| class DivElement extends Element native "*HTMLDivElement" {
|
|
|
| @@ -12697,7 +12718,11 @@ class HttpRequest extends EventTarget native "*XMLHttpRequest" {
|
| *
|
| * The Future is completed when the response is available.
|
| *
|
| - * Details to keep in mind when using credentials:
|
| + * The [withCredentials] parameter specified that credentials such as a cookie
|
| + * (already) set in the header or
|
| + * [authorization headers](http://tools.ietf.org/html/rfc1945#section-10.2)
|
| + * should be specified for the request. Details to keep in mind when using
|
| + * credentials:
|
| *
|
| * * Using credentials is only useful for cross-origin requests.
|
| * * The `Access-Control-Allow-Origin` header of `url` cannot contain a wildcard (*).
|
| @@ -12752,6 +12777,13 @@ class HttpRequest extends EventTarget native "*XMLHttpRequest" {
|
| }
|
|
|
|
|
| + /**
|
| + * 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
|
| static const EventStreamProvider<ProgressEvent> abortEvent = const EventStreamProvider<ProgressEvent>('abort');
|
| @@ -12820,15 +12852,35 @@ class HttpRequest extends EventTarget native "*XMLHttpRequest" {
|
| @DocsEditable
|
| 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
|
| @Creates('ArrayBuffer|Blob|Document|=Object|=List|String|num')
|
| final Object response;
|
|
|
| + /**
|
| + * The response in string form or `null on failure.
|
| + */
|
| @DomName('XMLHttpRequest.responseText')
|
| @DocsEditable
|
| 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
|
| String responseType;
|
| @@ -12838,22 +12890,47 @@ class HttpRequest extends EventTarget native "*XMLHttpRequest" {
|
| @DocsEditable
|
| 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
|
| 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
|
| 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
|
| 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
|
| 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
|
| void abort() native;
|
| @@ -12867,18 +12944,51 @@ class HttpRequest extends EventTarget native "*XMLHttpRequest" {
|
| @DocsEditable
|
| bool 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
|
| 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
|
| 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
|
| 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
|
| void overrideMimeType(String override) native;
|
| @@ -12888,6 +12998,13 @@ class HttpRequest extends EventTarget native "*XMLHttpRequest" {
|
| @DocsEditable
|
| 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
|
| void send([data]) native;
|
| @@ -12896,6 +13013,13 @@ class HttpRequest extends EventTarget native "*XMLHttpRequest" {
|
| @DocsEditable
|
| void setRequestHeader(String header, String value) native;
|
|
|
| + /**
|
| + * 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
|
| Stream<ProgressEvent> get onAbort => abortEvent.forTarget(this);
|
|
|