mirror of
https://github.com/nim-lang/Nim.git
synced 2026-08-03 22:18:40 +00:00
Deploy to GitHub pages
This commit is contained in:
12
nimcache/runnableExamples/dom_examples_2.nim
Normal file
12
nimcache/runnableExamples/dom_examples_2.nim
Normal file
@@ -0,0 +1,12 @@
|
||||
#[
|
||||
autogenerated by docgen
|
||||
loc: /home/runner/work/Nim/Nim/lib/js/dom.nim(22, 17)
|
||||
rdoccmd: -b:js -r:off
|
||||
]#
|
||||
import std/assertions
|
||||
import "/home/runner/work/Nim/Nim/lib/js/dom.nim"
|
||||
{.line: ("/home/runner/work/Nim/Nim/lib/js/dom.nim", 22, 17).}:
|
||||
proc example() = echo "5 seconds after document ready"
|
||||
proc domReady(e: Event) = discard setTimeout(example, 5_000) # Document is ready.
|
||||
document.addEventListener("DOMContentLoaded", domReady)
|
||||
|
||||
Reference in New Issue
Block a user