--
Consider asking HOWTO questions at Stack Overflow: http://stackoverflow.com/tags/dart
--
Infact this was the problem, however it was made slightly less obvious because the default project template for a chrome extension doesnt actually include a reference to pacakges/browser/dart.js by default. Perhaps that is by design but I didnt even realize it was missing, would it make sense to add this script in for a default extension, which presumably is going to be running in the browser?
Good call. It would probably be a good idea to add js interop too. Do you mind opening a bug for it? :)
Infact this was the problem, however it was made slightly less obvious because the default project template for a chrome extension doesnt actually include a reference to pacakges/browser/dart.js by default. Perhaps that is by design but I didnt even realize it was missing, would it make sense to add this script in for a default extension, which presumably is going to be running in the browser?
> since for chrome apps we're always compiling to javascript.Why is that? I've been using chrome apps in Dartium with dart scripts for quite some time now. Of course I know I can't deploy anything like that but I can't deploy a web app like that right now either :)
On Thursday, April 18, 2013 10:44:24 AM UTC-7, Devon Carew wrote:Infact this was the problem, however it was made slightly less obvious because the default project template for a chrome extension doesnt actually include a reference to pacakges/browser/dart.js by default. Perhaps that is by design but I didnt even realize it was missing, would it make sense to add this script in for a default extension, which presumably is going to be running in the browser?We omitted it originally because we didn't need the script auto-selection behavior - to run dart code or js code depending on the browser - since for chrome apps we're always compiling to javascript.I'll add some commented out references to dart.js and dart_interop.js in the sample. We're not doing JS interop in that sample, but this seems like a common issue that people are running into (having to in-line dart_interop.js, and including them in the right order). So leading them down the happy path would be best.--
Devon CarewSoftware EngineerGoogle, Inc.
--