| Index: lib/runtime/dart_runtime.js
|
| diff --git a/lib/runtime/dart_runtime.js b/lib/runtime/dart_runtime.js
|
| index 8549ca8c94c055ebec2b3fe57ca08c0d57d762b2..67cb4e23f5ed193a4637d85021027ba7086775b3 100644
|
| --- a/lib/runtime/dart_runtime.js
|
| +++ b/lib/runtime/dart_runtime.js
|
| @@ -96,10 +96,16 @@ var dart, _js_helper, _js_primitives;
|
| ftype = _getFunctionType(f);
|
| }
|
|
|
| - // TODO(leafp): Allow JS objects to go through?
|
| - if (!ftype) throw "Unable to find a type for applicand";
|
| + if (!ftype) {
|
| + // TODO(leafp): Allow JS objects to go through?
|
| + // This includes the DOM.
|
| + return f.apply(obj, args);
|
| + }
|
| +
|
| + if (ftype.checkApply(args)) {
|
| + return f.apply(obj, args);
|
| + }
|
|
|
| - if (ftype.checkApply(args)) return f.apply(obj, args);
|
| // TODO(leafp): throw a type error (rather than NSM)
|
| // if the arity matches but the types are wrong.
|
| throwNoSuchMethod(obj, name, args, f);
|
|
|