Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Side by Side Diff: tools/dom/templates/html/impl/impl_XMLHttpRequest.darttemplate

Issue 12463028: "Reverting 19586" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/dom/scripts/systemnative.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of $LIBRARYNAME; 5 part of $LIBRARYNAME;
6 6
7 /** 7 /**
8 * A utility for retrieving data from a URL. 8 * A utility for retrieving data from a URL.
9 * 9 *
10 * HttpRequest can be used to obtain data from http, ftp, and file 10 * HttpRequest can be used to obtain data from http, ftp, and file
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 */ 78 */
79 static Future<HttpRequest> request(String url, 79 static Future<HttpRequest> request(String url,
80 {String method, bool withCredentials, String responseType, sendData, 80 {String method, bool withCredentials, String responseType, sendData,
81 void onProgress(ProgressEvent e)}) { 81 void onProgress(ProgressEvent e)}) {
82 var completer = new Completer<HttpRequest>(); 82 var completer = new Completer<HttpRequest>();
83 83
84 var xhr = new HttpRequest(); 84 var xhr = new HttpRequest();
85 if (method == null) { 85 if (method == null) {
86 method = 'GET'; 86 method = 'GET';
87 } 87 }
88 xhr.open(method, url, async: true); 88 xhr.open(method, url, true);
89 89
90 if (withCredentials != null) { 90 if (withCredentials != null) {
91 xhr.withCredentials = withCredentials; 91 xhr.withCredentials = withCredentials;
92 } 92 }
93 93
94 if (responseType != null) { 94 if (responseType != null) {
95 xhr.responseType = responseType; 95 xhr.responseType = responseType;
96 } 96 }
97 97
98 if (onProgress != null) { 98 if (onProgress != null) {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 $if DART2JS 141 $if DART2JS
142 var xhr = new HttpRequest(); 142 var xhr = new HttpRequest();
143 return JS('bool', '"onloadend" in #', xhr); 143 return JS('bool', '"onloadend" in #', xhr);
144 $else 144 $else
145 return true; 145 return true;
146 $endif 146 $endif
147 } 147 }
148 148
149 $!MEMBERS 149 $!MEMBERS
150 } 150 }
OLDNEW
« no previous file with comments | « tools/dom/scripts/systemnative.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698