Vote count:
0
In Polymer (0.5.2) it appears that global HTML attributes, like lang, cannot be cleanly observed? For instance:
<polymer-element name="x-foo" attributes="lang bar">
..
<script>
Polymer({
langChanged: function () .. // never fires by itself
barChanged: function () .. // fires just fine
});
</script>
</polymer-element>
The interesting part is that the callback does fire if the element is dirtied in other ways. For example:
..
ready: function () {
this.lang = 'en';
}
..
This does not trigger any callback. However:
..
ready: function () {
this.lang = 'en';
this.bar = 'baz';
}
..
This fires both callbacks. So it appears that Polymer isn't correctly being notified about changes to "native" attributes? Is this a known issue? Can this be worked around?
asked 1 min ago
Attribute watchers never fire on "native" attributes?
Aucun commentaire:
Enregistrer un commentaire