javascript - Bind jQuery Keypress() to Polymer paper-input -
I am using the framework for the site on which I am working, I want to bind keypress () a polymer HTML JavaScript I am aware of the fact that polymers use shadow DOM elements, and therefore One way would be to do something like Either way, there is no need to force me to input keyboard input. & lt; Paper-input & gt; I
& lt; Paper input id = "whatever" label = "example" & gt; & Lt; / Paper-input & gt;
$ ("#Joe"). Keypress (function () {console.log ("this has worked!");});
& lt; Input & gt;
tag is the actual & lt; Paper-input & gt;
tag. $ ("# whatever"). Children ()
and somehow filter for a & lt; Input & gt;
tag, but I think it is not the best practice for polymers.
It's been a while, but I had the same problem with the web component examiner. It has been found that polymer is now a clean component iron-testing-assistants, in which a script is mock-interactive. JS
Use the key event like:
Javascript
Mock interface.quistion (polymer.dom (myEl. Root) .Some selectors ('# filter-input'), 'keypress', 13);
Comments
Post a Comment