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

Unified Diff: lib/html/src/dart2js_IDBKeyRangeFactoryProvider.dart

Issue 11094082: Convert legacy 'native code' to JS-forms in dart:html (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 8 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
« no previous file with comments | « lib/html/src/dart2js_FactoryProviders.dart ('k') | lib/html/src/dart2js_LocationWrapper.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/html/src/dart2js_IDBKeyRangeFactoryProvider.dart
diff --git a/lib/html/src/dart2js_IDBKeyRangeFactoryProvider.dart b/lib/html/src/dart2js_IDBKeyRangeFactoryProvider.dart
index 61b271fa605e51f1fa960b5f45f136e03c3fde43..71e9e38d0f9e54600d854dcba3411afad4dde826 100644
--- a/lib/html/src/dart2js_IDBKeyRangeFactoryProvider.dart
+++ b/lib/html/src/dart2js_IDBKeyRangeFactoryProvider.dart
@@ -27,23 +27,23 @@ class _IDBKeyRangeFactoryProvider {
return _cachedClass = _uncachedClass();
}
- static _uncachedClass() native '''
- return window.webkitIDBKeyRange || window.mozIDBKeyRange ||
- window.msIDBKeyRange || window.IDBKeyRange;
- ''';
+ static _uncachedClass() =>
+ JS('var',
+ '''window.webkitIDBKeyRange || window.mozIDBKeyRange ||
+ window.msIDBKeyRange || window.IDBKeyRange''');
static _translateKey(idbkey) => idbkey; // TODO: fixme.
- static _IDBKeyRangeImpl _only(cls, value) native
- '''return cls.only(value);''';
+ static _IDBKeyRangeImpl _only(cls, value) =>
+ JS('_IDBKeyRangeImpl', '#.only(#)', cls, value);
- static _IDBKeyRangeImpl _lowerBound(cls, bound, open) native
- '''return cls.lowerBound(bound, open);''';
+ static _IDBKeyRangeImpl _lowerBound(cls, bound, open) =>
+ JS('_IDBKeyRangeImpl', '#.lowerBound(#, #)', cls, bound, open);
- static _IDBKeyRangeImpl _upperBound(cls, bound, open) native
- '''return cls.upperBound(bound, open);''';
-
- static _IDBKeyRangeImpl _bound(cls, lower, upper, lowerOpen, upperOpen) native
- '''return cls.bound(lower, upper, lowerOpen, upperOpen);''';
+ static _IDBKeyRangeImpl _upperBound(cls, bound, open) =>
+ JS('_IDBKeyRangeImpl', '#.upperBound(#, #)', cls, bound, open);
+ static _IDBKeyRangeImpl _bound(cls, lower, upper, lowerOpen, upperOpen) =>
+ JS('_IDBKeyRangeImpl', '#.bound(#, #, #, #)',
+ cls, lower, upper, lowerOpen, upperOpen);
}
« no previous file with comments | « lib/html/src/dart2js_FactoryProviders.dart ('k') | lib/html/src/dart2js_LocationWrapper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698