Since the latest version of Polymer (0.2.4) I get the following warning for a bunch of elements:
Attributes on us-requests-list were data bound prior to Polymer upgrading the element. This may result in incorrect binding types.
How do I resolve this warning? I've found the following issue on Github:
https://github.com/Polymer/polymer-dev/issues/20
Where they say:
Bindings made to an element before it is upgraded can end up being attribute bindings where property bindings were expected.
Generally this happens when a user has loaded element definitions out-of-order.
But what does that mean? For me the warning happens for elements that don't have any bindings or attributes at all.
Perhaps someone can explain to me what these words mean so I can be more specific about my question. It seems to me like the warnings happen at random, the only thing I can say about them is that they only happen on custom elements that are nested in other custom elements, but I don't think it happens for all my nested custom elements.
When I've run into this in the past it's meant that I was defining my polymer elements in the wrong order. So if you define two elements my-elem1 and my-elem2 in one document, and my-elem2 depends on my-elem1, then the definition of my-elem1 should come first or you may see bugs like data not propagating as expected.
You can also avoid the warning by adding the element on the Polymer.import's callback using the following code (instead of innerHTML =):
Polymer({
ready: function() {
Polymer.import(["urlToImport"],
this.elementImportComplete.bind(this));
},
elementImportComplete: function() {
// Do it this way to avoid polymer's data binding warnings (and not
// by using innerHTML)
var el = document.createElement(this.feedTypes[this.type]);
this.$.container.appendChild(el);
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With