http://codepen.io/eeliya/pen/qNpBro
如果您在chrome上运行此codepen演示,当您单击该按钮时,您将看到一个警告。
但这在Firefox或Edge上不起作用。换句话说,attributeChanged不会在FF和边沿上触发
发布于 2017-04-21 01:18:12
这似乎是WebComponents polyfill中的一个错误。我找到的解决此问题的方法是在组件上使用setAttribute(),而不是直接赋值。换句话说,用component.setAttribute('active', true)代替component.active = true。
https://stackoverflow.com/questions/38373051
复制相似问题