Index: lib/src/common/js_proxy.dart |
diff --git a/lib/src/common/js_proxy.dart b/lib/src/common/js_proxy.dart |
index 3bc7b81b9b0d58a014aff3660140c55515ecaad8..276d378c81151c9c7db3165ed4a4dd2b94c97b6f 100644 |
--- a/lib/src/common/js_proxy.dart |
+++ b/lib/src/common/js_proxy.dart |
@@ -5,6 +5,7 @@ library polymer.lib.src.common.js_proxy; |
import 'dart:js'; |
import 'package:reflectable/reflectable.dart'; |
+import 'behavior.dart'; |
import 'declarations.dart'; |
// Mixin this class to get js proxy support! |
@@ -59,7 +60,12 @@ JsFunction _buildJsConstructorForType(Type dartType) { |
var constructor = _polymerDart.callMethod('functionFactory'); |
var prototype = new JsObject(context['Object']); |
- var declarations = declarationsFor(dartType, jsProxyReflectable); |
+ var declarations = declarationsFor( |
+ dartType, jsProxyReflectable, where: (name, declaration) { |
+ // Skip declarations from [BehaviorProxy] classes. These should not |
+ // read/write from the dart class. |
+ return !declaration.owner.metadata.any((m) => m is BehaviorProxy); |
Siggi Cherem (dart-lang)
2015/08/13 18:52:41
should we have a type to declare things that don't
jakemac
2015/08/13 19:14:29
Nothing else that I know of today, I think we can
|
+ }); |
declarations.forEach((String name, DeclarationMirror declaration) { |
if (isProperty(declaration)) { |
var descriptor = { |