turbowookie / turbo-wookie

Turbo Wookie Project. Because Turbo Wookie
http://turbowookie.github.io
BSD 3-Clause "New" or "Revised" License
9 stars 2 forks source link

Dart2js doesn't work. #33

Closed mpeterson2 closed 10 years ago

mpeterson2 commented 10 years ago

Dart2js seems to not work anymore with the latest Dart SDK. We get a few errors in the console when we use Chrome to view the app. Heres the console output I get:

GET file:///home/michael/Code/sample/build/web/packages/shadow_dom/shadow_dom.debug.js  sample.html:1
GET file:///home/michael/Code/sample/build/web/packages/custom_element/custom-elements.debug.js  sample.html:2
Uncaught TypeError: Object #<HTMLDocument> has no method 'registerElement' sample.html_bootstrap.dart.js:6681
    wi sample.html_bootstrap.dart.js:6681
    ei sample.html_bootstrap.dart.js:9102
    Ok sample.html_bootstrap.dart.js:9099
    QL sample.html_bootstrap.dart.js:2184
    aX.vV sample.html_bootstrap.dart.js:759
    Vg sample.html_bootstrap.dart.js:644
    (anonymous function) sample.html_bootstrap.dart.js:12464
    init.currentScript sample.html_bootstrap.dart.js:12444
    (anonymous function) sample.html_bootstrap.dart.js:12458
    (anonymous function) sample.html_bootstrap.dart.js:12585

Seeing as the sample app does the same thing, I'm pretty sure it's an issue with Polymer + Dart2js and it isn't our fault, but it's still a pretty big issue. If it is, hopefully they fix it soon...

I posted a question to stackoverflow here.

mpeterson2 commented 10 years ago

So the issue is in fact with the newer version of Dart. I downloaded an older version and now I just get a different error.

Now the problem is that all our polymer elements need the enteredView() method in order to work, but for some reason, it's not getting called in Javascript, which is, of course, breaking everything. This is also true for the sample app the editor generates.

Hopefully these issues get fixed soon, or it seems like we are going to be stuck with Dartium only...

mpeterson2 commented 10 years ago

I fixed the enteredView() part in bdf3138d26442f649c0c0ae2c04db8d1a832f197

mpeterson2 commented 10 years ago

Completely fixed in d04d562544793ec9cb1dfc8b3b6f68f899fda6c3.