UNPKG

can

Version:

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

43 lines (39 loc) 1.28 kB
<textarea-examples></textarea-examples> <script src="../../node_modules/steal/steal.js" dev-bundle main="@empty" id="demo-source"> import { StacheElement, type } from "can"; class TextareaExamples extends StacheElement { static view = ` <p> whatYouTyped: {{ this.whatYouTyped }} </p> <p> <label> value:to="this.whatYouTyped" <textarea value:to="this.whatYouTyped"></textarea> </label> </p> <p> <label> value:from="this.whatYouTyped" <textarea value:from="this.whatYouTyped"></textarea> </label> </p> <p> <label> value:bind="this.whatYouTyped" <textarea value:bind="this.whatYouTyped"></textarea> </label> </p> <p> <label> value:from="this.whatYouTyped" on:input:value:to="this.whatYouTyped" <textarea value:from="this.whatYouTyped" on:input:value:to="this.whatYouTyped"></textarea> </label> </p> `; static props = { whatYouTyped: type.maybeConvert(String) }; }; customElements.define("textarea-examples", TextareaExamples); </script>