evaluating _hyperscript expressions from within JavaScript
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript
Research direction
The issue identifies window._hyperscript as the JavaScript entry point; start by tracing its dynamic-expression evaluation and the async wait and do examples described in the report. Done means the supported JavaScript-facing behavior for asynchronous expressions is established, including the returned value and completion timing, with a reproducible test or documentation.
Written by the indexing model from the issue text.
Description
I know that _hyperscript code may be part of a <script> 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
- Dominant language
- JavaScript
- Stars
- 3.8k
- Forks
- 171
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bigskysoftware/_hyperscript
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
bigskysoftware/_hyperscript#688 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
bigskysoftware/_hyperscript#678 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
bigskysoftware/_hyperscript#676 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
bigskysoftware/_hyperscript#695 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 62/100
bigskysoftware/_hyperscript#687 ·
All issues in bigskysoftware/_hyperscript
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
area-deployment area-integrations triage:bot-seen
Difficulty 2/5 Half a day Newbie friendliness 86/100
-
Issue-Bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
sugarlabs/musicblocks#8924 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
ArduPilot/ardupilot_wiki#8088 ·
-
[BUG] createTool tools cannot be registered with Mastra when exactOptionalPropertyTypes is enabled Opencustomer-eng status: needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 84/100