Skip to content
This repository has been archived by the owner on Dec 19, 2017. It is now read-only.

Commit

Permalink
code review updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jakemac53 committed Sep 9, 2015
1 parent 45cd98f commit aea190d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/src/common/js_proxy.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ abstract class JsProxy implements JsProxyInterface {
/// Lazily create proxy constructors!
static Map<Type, JsFunction> _jsProxyConstructors = {};

/// Never reads from the dart object, instead reads properties from the
/// `__cache__` object. This is primarily useful for objects that you pass in
/// Whether to introduce a cache layer and make operations read from the cache.
/// By default JsProxys have no cache and the proxy reads values directly from
/// the Dart object. This is primarily useful for objects that you pass in
/// empty, and the javascript code will populate. It should be used carefully
/// since its easy to get the two objects out of sync.
bool useCache = false;
Expand Down Expand Up @@ -107,7 +108,7 @@ JsFunction _buildJsConstructorForType(Type dartType) {
(dartInstance, arguments) {
var newArgs = arguments.map((arg) => dartValue(arg)).toList();
var mirror = jsProxyReflectable.reflect(dartInstance);
return mirror.invoke(name, newArgs);
return jsValue(mirror.invoke(name, newArgs));
}
]);
}
Expand Down

0 comments on commit aea190d

Please sign in to comment.