Polymer input change event

前端 未结 5 1713
独厮守ぢ
独厮守ぢ 2021-02-05 20:42

All I want is to be able to get the input from a polymer element and alert it onchange WITHOUT creating a custom polymer element.

issues: on-change

5条回答
  •  旧巷少年郎
    2021-02-05 21:14

    The on-* declarative event handlers are syntactic sugar provided by Polymer, so on-change won't work outside of a Polymer element. You can do the same thing in vanilla Javascript using querySelector and addEventListener:

    
    
    
    

提交回复
热议问题