deleted web and dist
This commit is contained in:
parent
07d5a8085b
commit
972c510861
50 changed files with 4986 additions and 2289 deletions
16
tests/ecmas.nim
Normal file
16
tests/ecmas.nim
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# This file tests the ECMAScript generator
|
||||
|
||||
import
|
||||
dom, strutils
|
||||
|
||||
# We need to declare the used elements here. This is annoying but
|
||||
# prevents any kind of typo:
|
||||
var
|
||||
inputElement {.importc: "document.form1.input", nodecl.}: ref TElement
|
||||
|
||||
proc OnButtonClick() {.exportc.} =
|
||||
var x: int = parseInt($inputElement.value)
|
||||
echo($(x * x))
|
||||
|
||||
proc OnLoad() {.exportc.} =
|
||||
echo("Welcome! Please take your time to fill in this formular!")
|
||||
Loading…
Add table
Add a link
Reference in a new issue