Hello Polymers,
we have just inherited an old app, where Polymer (v.1.7.0) is autodeployed and used for some components. So I don't know much about Polymer, not even the basics. Our problem was sometimes we're getting this kind of error:
Polymer.dom.addDebouncer (...) is not a function
After some research I realized there are two different doms. One of them is a function, defined at polymer-mini.html:
Polymer.dom = function (obj, patch) {
if (obj instanceof Event) {
return Polymer.EventApi.factory(obj);
} else {
return DomApi.factory(obj, patch);
}
};
The other is defined on a js at the app and might have 'shadow' or 'shady' values:
window.Polymer.dom = 'shadow';
if (typeof Polymerdom !== "undefined") {
window.Polymer.dom = Polymerdom;
}
That error only happens sometimes, and it is solved by removing the second code piece, but I'd like to understand the reasons behind this. Is the second piece wrong? Is it a name clashing issue?
If anyone sheds some light into this matter, it would be very much appreciated.
Thanks a lot!