http://codepen.io/eeliya/pen/qNpBro
If you run this codepen demo on chrome, you will see an alert when you click the button.
But this does not work on Firefox or Edge. In other word attributeChanged
is not triggered on FF and Edge
http://codepen.io/eeliya/pen/qNpBro
If you run this codepen demo on chrome, you will see an alert when you click the button.
But this does not work on Firefox or Edge. In other word attributeChanged
is not triggered on FF and Edge
It seems like this may be a bug in the WebComponents polyfill. The work-around I have found for this issue is to use setAttribute()
on the component, instead of direct assignment. In other words, component.setAttribute('active', true)
instead of component.active = true
.