Open charles-prof opened 5 months ago
Getting this as well on. Tested on versions 0.9.{10,11,12} in the latest chrome and firefox.
This causes the expression evaluation not to work, and the page reloads when hitting enter.
Hitting this the first time trying HBD today, without this issue I would have continued thinking I was doing something wrong with the installation etc.
My intuition "set is ambiguous"
set
is implemented as a command and also a feature.
How to differentiate when calling ?
This is being set
is called on top level (I think) as a feature
(I tried to use put
for temporary workaround - I failed in getting it to work)
I'm left wondering how no one else noticed this. Surely we are doing something different than others?
Not sure what you mean about the set vs put (unless you are talking about in the HDB implementation. I even hit it on this, when there is no set.
<a href="#" _="on click breakpoint">Click Me</a>
Sorry I mean the set
used in the source of the UI (hdb.js)
செவ்., 21 மே, 2024, 01:11க்கு, Zak Kohler @.***> எழுதியது:
I'm left wondering how no one else noticed this. Surely we are doing something different than others?
Not sure what you mean about the set vs put (unless you are talking about in the HDB implementation. I even hit it on this, when there is no set.
— Reply to this email directly, view it on GitHub https://github.com/bigskysoftware/_hyperscript/issues/539#issuecomment-2121084500, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQK2QCJF3IOSJMP25OJX5PLZDJGW3AVCNFSM6AAAAABH7CMITCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRRGA4DINJQGA . You are receiving this because you authored the thread.Message ID: @.***>
Ok you were close on the setCommand vs setFeature thing. An extra end
was pushing the set
to be parsed as feature.
But how was this mistake committed 2 years ago and only noticed today, by two people within 11 hours? Doesn't anyone use the expression eval feature of hdb?
I think hdb is only needed when someone writes their own hyperscript behaviours/functions.
My journey to this....
I was struggling with hyperscript events with my htmx/_hyperscript/shoelace project (just for learning)
Shoelace's <sl-include>
web component fetches html content and triggers
sl-load
custom event.
Htmx captures it with hx-on:sl-load =
But hyperscript gave an error with _ ="on sl-load log me"
So I (found the right way to do it) wrapped with single quotes like this
_ ="on 'sl-load' log me"
(Request: This little detail can be added in the hyperscript about event name convention)
In the process I used devtools first and set breakpoints in the hyperscript.js source lines
I never needed hdb for debugging honestly (for simple coding needs)
The struggling with events started when I started to fetch content with
all the three (shoelace's
That struggle made me look into the source code (parallely reading the docs again and again)
That struggle taught me about the htmx.process (in docs), _hyperscript.processNode (only refered on the put command as far as I know)
(Request: add a note about _hyperscript.processNode for contents loaded after the browserInit (dynamic/ajax content) with strong suggestion to call processNode manually in such scenario)
[Last note
I just started using both htmx and hyperscript in the past two days
I know early about htmx - top ranked in the best of js but now only I had chance to use it (I kind of bookmarked it for the future as I liked inline ajax and its concise syntax)
]
Finally,
is there any (user or community maintained ) library of hyperscript functions/behaviours available ??
செவ்., 21 மே, 2024, 01:46க்கு, Zak Kohler @.***> எழுதியது:
image.png (view on web) https://github.com/bigskysoftware/_hyperscript/assets/6101677/9724c1a2-f4ba-4ea7-80b2-abd3bad1bf39
Ok you were close on the setCommand vs setFeature thing. An extra end was pushing the set to be parsed as feature.
But how was this mistake committed 2 years ago and only noticed today, by two people within 11 hours? Doesn't anyone use the expression eval feature of hdb?
— Reply to this email directly, view it on GitHub https://github.com/bigskysoftware/_hyperscript/issues/539#issuecomment-2121138813, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQK2QCPCHLTTDDAVWP7MQT3ZDJKZBAVCNFSM6AAAAABH7CMITCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRRGEZTQOBRGM . You are receiving this because you authored the thread.Message ID: @.***>
Calling breakpoint causes this error whether inline or on a hyperscript function (def)
My code and script order
The original error message