[js-interop] Fix function binding and avoid noSuchMethod when using map notation
This change does two things:
(1) It avoids noSuchMethod and dartbug.com/9283 when map notation is
used. I don't like losing the varargs-like behavior of NSM, so I'm
not entirely sure we should land this part.
(2) This also binds receivers on returned functions to make
a['foo']() and a.foo() equivalent. JS has odd semantics around this.
a is the receiver (i.e., the "this") in the function invocation. But, in the following:
var tmp = a['foo'];
it is not. We don't distinguish between the two in js-interop. This
change essentially forces the former semantics over the latter.
Note: kevmoo's pop-pop-win app in dartbug.com/9283 works with in
dart2js minified with these changes along with the source change in
Total comments: 4
Total messages: 10