Description
This issue was originally filed by jack.palevich@gmail.com
I have some dart code that succeeds when run directly from frogsh, but fails if you first compile it to JavaScript and then execute the JavaScript.
Download test.dart, and then execute the following commands
$ frogsh test.dart
/usr/bin/frogsh
$ frogsh --compile-only --out=test.js test.dart
$ node test.js
node.js:134
throw e; // process.nextTick error, or 'error' event on first tick
^
TypeError: Object node,/Users/jackpal/Desktop/test.js has no method 'getRange'
at main (/Users/jackpal/Desktop/test.js:534:22)
at /Users/jackpal/Desktop/test.js:536:23
at /Users/jackpal/Desktop/test.js:482:5
at isolate$Isolate.run (/Users/jackpal/Desktop/test.js:218:14)
at isolate$IsolateEvent.process (/Users/jackpal/Desktop/test.js:254:16)
at isolate$doOneEventLoopIteration (/Users/jackpal/Desktop/test.js:441:11)
at isolate$doRunEventLoop (/Users/jackpal/Desktop/test.js:457:26)
at isolate$runEventLoop (/Users/jackpal/Desktop/test.js:465:5)
at RunEntry (/Users/jackpal/Desktop/test.js:484:3)
at Object.<anonymous> (/Users/jackpal/Desktop/test.js:536:1)
My guess is that the JavaScript code emitted by frogsh probably needs to patch the Array prototype to add the "getRange" method.