dart-lang/spark — pull request #2247 by ussuri (2014-06-02 17:46:05+00:00)
Title: Fix buttons state in dart2js version of the app

@devoncarew

Even the old Polymer Dart tricks have stopped working in some cases now (explicit `deliverChanges()`, `Observable.check()`, explicitly setting the value of a sub-elements's attribute in the parent's .dart rather than relying on `{{}}` data binding in the .html...).

The situation with subclassing one element from another seems to be particularly bad. Sometimes, changes to the superclass's `@published` properties in the subclass's `enteredView()` are impossible to make work: the respective HTML attributes on the resulting element never get set, so the element remains unstyled.

The 2 things that I found working are:

* Setting the HTML attributes on an element directly, rather than setting corresponding properties internally or externally;
* Using composition in place of subclassing.

All the above is on a case-by-case basis. We have widgets for which all of that works.

@jmesserly, this is really taking a big toll on us now. Could you guys take a really close look at what's going on?