bigskysoftware / bigskysoftware/_hyperscript
evaluating _hyperscript expressions from within JavaScript
- Dominant language
- JavaScript
- Stars
- 3.8k
- Forks
- 172
- PR merge metrics
- No merged PRs in 30d
Description
I know that _hyperscript code may be part of a element or an attribute of a DOM element.
But how can I evaluate dynamic _hyperscript expressions from within JavaScript (e.g., as part of a REPL)?
`window._hyperscript` seems to be a function which principally does what I need - but it does not return a Promise in case of asynchronous code (e.g., `wait 2s`).
And (even more surprising), evaluating `async wait 2s log "Hi!" return "Hello, World!"` immediately returns "Hello, World!" but waits 2s before logging "Hi!" - what I definitely do not understand...
Thus, how can I evaluate (potentially asynchronous) dynamic(!) _hyperscript expressions from within JavaScript?
Amendment: `async do ... end` returns `undefined` like not using `async` at all
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.