yew/examples/js_callback/static/get-payload-script.js
Justin Starry fa8a1d9f00
Reorganize examples and general repo layout (#1092)
* Reorganize crates

* Remove symlink

* Check examples

* Cleanup CI scripts

* nits

* cleanup

* cargo fmt

* Fix yew-stdweb

* cargo clippy --all

* stdweb-examples

* run_emscripten_checks.sh

* Fix typo

* fix typo

* yew-stdweb

* Run tests from yew-stdweb

* fix webgl script
2020-04-20 22:22:24 +08:00

10 lines
172 B
JavaScript

function get_payload() {
return (new Date()).toString()
}
function get_payload_later(callback) {
setTimeout(() => {
callback(get_payload())
}, 1000)
}