custom-elements-hmr-polyfill
custom-elements-hmr-polyfill copied to clipboard
Polymer decorators don't work well with the polyfill
To reproduce:
- Implement a Polymer 3 element with Polymer decorators and a computed property, like:
class X extends PolymerElement {
@decorators.property({ notify: true, reflectToAttribute: true, computed: "getP1()", type: String })
p1: string = null;
getP1(): string {
return 'second string';
}
static get template(): HTMLTemplateElement {
return html`p1: [[p1]]`;
}
The computed property is not computed with the polyfill, without it is.
Any idea?
Never used polymer 3. Any reason why you dont use lit-element or something newer? Noticed this:

But basically Ive noticed some issues with some libs if they do to much fancy stuff.
Added some points under readme under Limitations I know about atm.
Might be the issue I have with observeredAttributes,, some libs do not like what this library here. I need add a option to skip this part.
Do you have more complete sample btw, like :
- install
npm install polymer - add this element to dom
- copy this file and run.
then I might get a chance to have a quick look later this week.
Any reason why you dont use lit-element or something newer?
We use both, we are in a transition phase.
I will create a test project!
Thanks