Should have documentation on removing Polymer DOM type declaration
garrettjohnston opened this issue · 0 comments
garrettjohnston commented
When migrating from 1.0 to 2.0, I was running into strange problems where a hybrid element and all of it's dependencies were failing to properly load with the error "Polymer is not a function" given on each elements Polymer({...})
declaration.
The issue ended up being this code snippet in my index.html
that defined whether I was using shady or shadow dom in Polymer 1.0:
window.Polymer = {
dom: 'shadow',
lazyRegister: true,
};
Simply removing it solved the issue, as Shady DOM has been removed from the core Polymer code.
I think it would be very helpful to have this tip in the "Polymer 2.0 upgrade guide" documentation. Took me a while to figure it out, and it was unclear that I needed to remove it.