OLD | NEW |
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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 * Note: Most simple HTTP requests can be accomplished using the [getString], | 397 * Note: Most simple HTTP requests can be accomplished using the [getString], |
398 * [request], [requestCrossOrigin], or [postFormData] methods. Use of this | 398 * [request], [requestCrossOrigin], or [postFormData] methods. Use of this |
399 * `open` method is intended only for more complext HTTP requests where | 399 * `open` method is intended only for more complext HTTP requests where |
400 * finer-grained control is needed. | 400 * finer-grained control is needed. |
401 */ | 401 */ |
402 @DomName('XMLHttpRequest.open') | 402 @DomName('XMLHttpRequest.open') |
403 @DocsEditable() | 403 @DocsEditable() |
404 $if JSINTEROP | 404 $if JSINTEROP |
405 void open(String method, String url, {bool async, String user, String password
}) { | 405 void open(String method, String url, {bool async, String user, String password
}) { |
406 if (async == null && user == null && password == null) { | 406 if (async == null && user == null && password == null) { |
407 _blink.BlinkXMLHttpRequest.instance.open_Callback_2_(unwrap_jso(this), met
hod, url); | 407 _blink.BlinkXMLHttpRequest.instance.open_Callback_2_(this, method, url); |
408 } else { | 408 } else { |
409 _blink.BlinkXMLHttpRequest.instance.open_Callback_5_(unwrap_jso(this), met
hod, url, async, user, password); | 409 _blink.BlinkXMLHttpRequest.instance.open_Callback_5_(this, method, url, as
ync, user, password); |
410 } | 410 } |
411 } | 411 } |
412 $else | 412 $else |
413 void open(String method, String url, {bool async, String user, String password
}) native; | 413 void open(String method, String url, {bool async, String user, String password
}) native; |
414 $endif | 414 $endif |
415 | 415 |
416 $!MEMBERS | 416 $!MEMBERS |
417 } | 417 } |
OLD | NEW |