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) { |