Has a weird problem. In my Dart code, I have some polymer components on the screen, and one of them has a method that I call from my main ().
I get a link to it by doing
PolyComp poly = querySelector("#idOfPolymer");
poly.flash();
This works great in darts. The page loads and PolyComp starts flashing. However, when I run this in Chrome by running the Build Polymer application from the Dart IDE, I get an error message that says it cannot call flash () on null.
I ended up firing it just using the event bus and letting PolyComp listen on my event, but this is overkill.
What am I doing wrong? This happens in the latest Chrome, Firefox, and Safari browsers.
Edit:
I built the following application for an IP application for JS and ran into the same problem.
https://github.com/sethladd/dart-polymer-dart-examples/blob/master/web/todo_element/todo.html
Works on DartVM, not Chrome, because it calls a method on the null item.
source
share