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

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

Issue 1321613005: Dartium w/ JsInterop enabled (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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
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 client-side XHR request for getting data from a URL, 8 * A client-side XHR request for getting data from a URL,
9 * formally known as XMLHttpRequest. 9 * formally known as XMLHttpRequest.
10 * 10 *
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 var value = header.substring(splitIdx + 2); 377 var value = header.substring(splitIdx + 2);
378 if (headers.containsKey(key)) { 378 if (headers.containsKey(key)) {
379 headers[key] = '${headers[key]}, $value'; 379 headers[key] = '${headers[key]}, $value';
380 } else { 380 } else {
381 headers[key] = value; 381 headers[key] = value;
382 } 382 }
383 } 383 }
384 return headers; 384 return headers;
385 } 385 }
386 386
387 /**
388 * Specify the desired `url`, and `method` to use in making the request.
389 *
390 * By default the request is done asyncronously, with no user or password
391 * authentication information. If `async` is false, the request will be send
392 * synchronously.
393 *
394 * Calling `open` again on a currently active request is equivalent to
395 * calling `abort`.
396 *
397 * Note: Most simple HTTP requests can be accomplished using the [getString],
398 * [request], [requestCrossOrigin], or [postFormData] methods. Use of this
399 * `open` method is intended only for more complext HTTP requests where
400 * finer-grained control is needed.
401 */
402 @DomName('XMLHttpRequest.open')
403 @DocsEditable()
404 $if JSINTEROP
405 void open(String method, String url, {bool async, String user, String password }) {
406 if (async == null && user == null && password == null) {
407 _blink.BlinkXMLHttpRequest.instance.open_Callback_2_(unwrap_jso(this), met hod, url);
408 } else {
409 _blink.BlinkXMLHttpRequest.instance.open_Callback_5_(unwrap_jso(this), met hod, url, async, user, password);
410 }
411 }
412 $else
413 void open(String method, String url, {bool async, String user, String password }) native;
414 $endif
415
387 $!MEMBERS 416 $!MEMBERS
388 } 417 }
OLDNEW
« no previous file with comments | « tools/dom/templates/html/impl/impl_WorkerNavigator.darttemplate ('k') | tools/dom/templates/immutable_list_mixin.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698