Skip to content

Instantly share code, notes, and snippets.

@stisa
Created March 18, 2017 20:43
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stisa/6e56afa0b8bd2ef0c203253df053b8d3 to your computer and use it in GitHub Desktop.
Save stisa/6e56afa0b8bd2ef0c203253df053b8d3 to your computer and use it in GitHub Desktop.
Nim js backend: input element
<html>
<body>
<input id="input" type="text" name="fname">
<script src="nimcache/t.js"></script>
</body>
</html>
import dom
type Input = ref object of Element
value: cstring
`type`: cstring
var inp = document.getElementById("input").Input
inp.value = "hello"
echo inp.type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment