A bunch more documentation.
Review URL: https://codereview.chromium.org//12156002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17987 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index fa01893..d540e7b 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -6574,7 +6574,7 @@
Touch _$dom_createTouch_1(Window window, target, identifier, pageX, pageY, screenX, screenY, webkitRadiusX, webkitRadiusY, webkitRotationAngle, webkitForce) native;
@JSName('createTouchList')
- /// Use the [TouchList] constructor isntead.
+ /// Use the [TouchList] constructor instead.
@DomName('Document.createTouchList')
@DocsEditable
TouchList $dom_createTouchList() native;
@@ -12823,7 +12823,8 @@
*
* is the (more verbose) equivalent of
*
- * var request = new HttpRequest.get('http://dartlang.org', (event) => print('Request complete'));
+ * var request = new HttpRequest.get('http://dartlang.org',
+ * (event) => print('Request complete'));
*/
@DomName('XMLHttpRequest.XMLHttpRequest')
@DocsEditable
@@ -12848,6 +12849,38 @@
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
final int readyState;
@@ -12886,6 +12919,13 @@
String responseType;
@JSName('responseXML')
+ /**
+ * 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
final Document responseXml;
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
index 8890163..41f2758 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -7347,7 +7347,7 @@
@DocsEditable
Touch $dom_createTouch(Window window, EventTarget target, int identifier, int pageX, int pageY, int screenX, int screenY, int webkitRadiusX, int webkitRadiusY, num webkitRotationAngle, num webkitForce) native "Document_createTouch_Callback";
- /// Use the [TouchList] constructor isntead.
+ /// Use the [TouchList] constructor instead.
@DomName('Document.createTouchList')
@DocsEditable
TouchList $dom_createTouchList() native "Document_createTouchList_Callback";
@@ -13774,7 +13774,8 @@
*
* is the (more verbose) equivalent of
*
- * var request = new HttpRequest.get('http://dartlang.org', (event) => print('Request complete'));
+ * var request = new HttpRequest.get('http://dartlang.org',
+ * (event) => print('Request complete'));
*/
@DomName('XMLHttpRequest.XMLHttpRequest')
@DocsEditable
@@ -13801,6 +13802,38 @@
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
int get readyState native "XMLHttpRequest_readyState_Getter";
@@ -13851,6 +13884,13 @@
@DocsEditable
void set responseType(String value) native "XMLHttpRequest_responseType_Setter";
+ /**
+ * 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
Document get responseXml native "XMLHttpRequest_responseXML_Getter";
diff --git a/tools/dom/docs/docs.json b/tools/dom/docs/docs.json
index a8c16aa..89087ea 100644
--- a/tools/dom/docs/docs.json
+++ b/tools/dom/docs/docs.json
@@ -104,7 +104,7 @@
"/// Deprecated: use new Element.tag(tagName) instead."
],
"createTouchList": [
- "/// Use the [TouchList] constructor isntead."
+ "/// Use the [TouchList] constructor instead."
],
"getCSSCanvasContext": [
"/// Moved to [HtmlDocument]."
@@ -288,6 +288,40 @@
" * of [common MIME types](http://en.wikipedia.org/wiki/Internet_media_type#List_of_common_media_types)",
" */"
],
+ "readyState": [
+ "/**",
+ " * 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>",
+ " */"
+ ],
"response": [
"/**",
" * The data received as a reponse from the request.",
@@ -314,6 +348,15 @@
" * See also: [MDN responseType](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#responseType)",
" */"
],
+ "responseXML": [
+ "/**",
+ " * The request response, or null on failure.",
+ " *",
+ " * The response is processed as",
+ " * `text/xml` stream, unless responseType = 'document' and the request is",
+ " * synchronous.",
+ " */"
+ ],
"send": [
"/**",
" * Send the request with any given `data`.",
@@ -361,7 +404,8 @@
" *",
" * is the (more verbose) equivalent of",
" *",
- " * var request = new HttpRequest.get('http://dartlang.org', (event) => print('Request complete'));",
+ " * var request = new HttpRequest.get('http://dartlang.org',",
+ " * (event) => print('Request complete'));",
" */"
]
}