| Index: frog/value.dart
|
| diff --git a/frog/value.dart b/frog/value.dart
|
| index 48f7efddf96d01f73684754ef71406c471b7bc2d..13e9c0547efa42ea399710700fcbfcb78aea8501 100644
|
| --- a/frog/value.dart
|
| +++ b/frog/value.dart
|
| @@ -651,7 +651,7 @@ class Value {
|
| }
|
|
|
| // TODO(jmesserly): handle when type or toType are type parameters.
|
| - if (toType.library == world.dom && type.library != world.dom) {
|
| + if (toType.library.isDomOrHtml && !type.library.isDomOrHtml) {
|
| // TODO(jmesserly): either remove this or make it a more first class
|
| // feature of our native interop. We shouldn't be checking for the DOM
|
| // library--any host environment (like node.js) might need this feature
|
| @@ -659,8 +659,10 @@ class Value {
|
| // native code--many callbacks like List.filter are perfectly safe.
|
| if (arity == 0) {
|
| world.gen.corejs.useWrap0 = true;
|
| - } else {
|
| + } else if (arity == 1) {
|
| world.gen.corejs.useWrap1 = true;
|
| + } else if (arity == 2) {
|
| + world.gen.corejs.useWrap2 = true;
|
| }
|
|
|
| result = new Value(toType, '\$wrap_call\$$arity(${result.code})', span);
|
|
|