UNPKG

can

Version:

MIT-licensed, client-side, JavaScript framework that makes building rich web applications easy.

45 lines (40 loc) 1.26 kB
<text-fields></text-fields> <script type="text/stache" id="demo-html"></script> <script src="../../node_modules/steal/steal.js" dev-bundle main="@empty" id="demo-source"> import { StacheElement } from "can"; class TextFields extends StacheElement { static view = ` <p> whatYouTyped: {{ this.whatYouTyped }} </p> <p> <label> value:to="this.whatYouTyped" <input type="text" value:to="this.whatYouTyped"> </label> </p> <p> <label> value:from="this.whatYouTyped" <input type="text" value:from="this.whatYouTyped"> </label> </p> <p> <label> value:bind="this.whatYouTyped" <input type="text" value:bind="this.whatYouTyped"> </label> </p> <p> <label> value:from="this.whatYouTyped" on:input:value:to="this.whatYouTyped" <input type="text" value:from="this.whatYouTyped" on:input:value:to="this.whatYouTyped"> </label> </p> `; static props = { whatYouTyped: "" }; }; customElements.define("text-fields", TextFields); </script>