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

Unified Diff: sdk/lib/_internal/js_runtime/lib/uri_patch.dart

Issue 1381033002: Add data-URI support class to dart:core (next to Uri). (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Added library now working (thanks fschneider). Back to the main content. Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/js_runtime/lib/uri_patch.dart
diff --git a/sdk/lib/_internal/js_runtime/lib/uri_patch.dart b/sdk/lib/_internal/js_runtime/lib/uri_patch.dart
new file mode 100644
index 0000000000000000000000000000000000000000..acba3dd763f9e64295d4ebbf16f08ab2c60982d2
--- /dev/null
+++ b/sdk/lib/_internal/js_runtime/lib/uri_patch.dart
@@ -0,0 +1,19 @@
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:_js_helper' show patch, Primitives;
+
+@patch
+class Uri {
+ @patch
+ static bool get _isWindows => false;
+
+ @patch
+ static Uri get base {
+ String uri = Primitives.currentUri();
+ if (uri != null) return Uri.parse(uri);
+ throw new UnsupportedError("'Uri.base' is not supported");
+ }
+}
+

Powered by Google App Engine
This is Rietveld 408576698