Files
Nim/nimcache/runnableExamples/dom_examples_2.nim
github-actions[bot] c7440eccf2 Deploy to GitHub pages
2025-09-27 04:02:34 +00:00

13 lines
442 B
Nim

#[
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)