Skip to content

Instantly share code, notes, and snippets.

@artalar
Forked from jcollins-g/index.html
Last active December 18, 2019 14:50
Show Gist options
  • Save artalar/2b3ff6c83f6d6447ce071ca6beb52718 to your computer and use it in GitHub Desktop.
Save artalar/2b3ff6c83f6d6447ce071ca6beb52718 to your computer and use it in GitHub Desktop.
input
<div id='root'>
</div>
import 'dart:html' as html;
void main() {
var input = html.document.createElement('input');
var output = html.document.createElement('p');
html.querySelector('#root').append(input);
html.querySelector('#root').append(html.document.createElement('br'));
html.querySelector('#root').append(output);
input.onInput.listen(
(e) => output.innerText = ((e.currentTarget as html.InputElement).value));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment