We are pleased to present the 0.9.4 release of hyperscript.
transition
command no longer supports "naked" strings for style
values. This means that code like this must be changed: transition my color to red -- Old syntax
transition my color to "red" -- New syntax
However, with the addition of general measurement literals to the language, mentioned below, many transitions
will not need to be changed: transition my width to 100% -- Works because `100%` is a valid, general expression now
If you have questions or need help, please jump on the htmx discord for help set my *opacity to 50%
log my *opacity -- logs the explicit opacity of the element
log my *computed-opacity -- logs the computed opacity of the element
50%
available generally in
the language: set my *opacity to 50%
on click
alert("I was clicked") -- a stand alone function call can now simply be a top level command
sender
symbol is now available in event handlers, and will be set to the element that sent an event to the current
element, if anyfetch
command supports a better syntax, with the response transformation before the with
clause, which eliminates some grammatical ambiguity: fetch /example as json
with method: "POST"
on click toggle my *opacity
on click toggle my *display
call select2(...)
Promise.all()
function (thank you to Deniz for noticing this!)in
expressionform
elements now works properlyEnjoy!