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

Unified Diff: sdk/lib/html/dartium/html_dartium.dart

Side-by-side diff isn't available for this file because of its large size.
Issue 23640003: Adding support for cross-origin requests on IE9. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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:
Download patch
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | tests/html/xhr_cross_origin_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dartium/html_dartium.dart
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
index 7dd1e5fa262f46a7b84bfdc605e44c7478ccd7aa..c5aef22eacb474aea8fa677e67b1a6bc6184adbf 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -13599,6 +13599,22 @@ class HttpRequest extends EventTarget {
return true;
}
+ /**
+ * Makes a cross-origin request to the specified URL.
+ *
+ * This API provides a subset of [request] which works on IE9. If IE9
+ * cross-origin support is not required then [request] should be used instead.
+ */
+ @Experimental()
+ static Future<String> requestCrossOrigin(String url,
+ {String method, String sendData}) {
+ if (supportsCrossOrigin) {
+ return request(url, method: method, sendData: sendData).then((xhr) {
+ return xhr.responseText;
+ });
+ }
+ }
+
// To suppress missing implicit constructor warnings.
factory HttpRequest._() { throw new UnsupportedError("Not supported"); }
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | tests/html/xhr_cross_origin_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698