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

Unified Diff: lib/src/compiler/js_interop.dart

Issue 1920473003: Use correct annotation for JS names (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Address comments Created 4 years, 8 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/runtime/dart_sdk.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/compiler/js_interop.dart
diff --git a/lib/src/compiler/js_interop.dart b/lib/src/compiler/js_interop.dart
index db0b7833bc25dcb31fd7f23350b0a491fb0f2e73..afdd0ed996939920ee497e38b52760c14c14887a 100644
--- a/lib/src/compiler/js_interop.dart
+++ b/lib/src/compiler/js_interop.dart
@@ -34,8 +34,11 @@ bool isJsSpreadInvocation(MethodInvocation i) =>
_isJsLibType('spread', i.methodName?.bestElement);
// TODO(jmesserly): Move JsPeerInterface to package:js (see issue #135).
+// TODO(jacobr): The 'JS' annotation is the new, publically accessible one.
+// The 'JsName' annotation is the old one using internally by dart2js and
+// html libraries. These two concepts will probably merge eventually.
bool isJSAnnotation(DartObjectImpl value) =>
- _isJsLibType('JS', value.type.element);
+ _isJsLibType('JS', value.type.element) || isJsName(value);
bool _isBuiltinAnnotation(
DartObjectImpl value, String libraryName, String annotationName) {
« no previous file with comments | « lib/runtime/dart_sdk.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698