@@ -8,7 +8,8 @@ date: 2026-03-29
88## hyperscript 0.9.90 Release
99
1010We are pleased to present the 0.9.90 release of hyperscript. This is a significant release that includes a complete
11- internal restructuring, a new reactivity system, many new commands and expressions, and improved error handling.
11+ internal restructuring, a new experimental reactivity system, a rewritten templating system, DOM morph support
12+ an experimental components mechanism, many new commands and expressions, and improved error handling.
1213
1314There is an [ Upgrade Guide] ( #upgrade-guide ) at the bottom of this release note.
1415
@@ -247,17 +248,65 @@ toggle $theme between 'light', 'dark' and 'auto'
247248This works with any [ assignable expression] ( /commands/set ) - variables, properties, style refs - and
248249supports any number of values, not just two.
249250
251+ #### take enhancements
252+
253+ The [ ` take ` ] ( /commands/take ) command gains two features:
254+
255+ ** ` giving ` keyword** -- an alternative to ` with ` that reads more naturally after the ` from ` clause:
256+
257+ ``` hyperscript
258+ take @aria-selected='true' from <[role=tab]/> in me giving 'false' for tab
259+ ```
260+
261+ ** Class swap** -- ` take ` now supports a replacement class via ` with ` or ` giving ` , so the
262+ ` from ` elements get one class and the ` for ` target gets the other:
263+
264+ ``` hyperscript
265+ take .selected from .opt giving .unselected for the closest <.opt/> to the target
266+ ```
267+
268+ #### remove properties and array indices
269+
270+ The [ ` remove ` ] ( /commands/remove ) command now works on object properties and array indices:
271+
272+ ``` hyperscript
273+ remove :arr[1] -- splices index 1 out of the array
274+ remove :obj.field -- deletes the property
275+ remove field of :obj -- same, using the `of` form
276+ ```
277+
278+ For arrays, ` remove ` uses ` splice ` (indices shift). For objects, it uses ` delete ` .
279+ If the value at the expression is a DOM node, ` remove ` falls through to DOM detachment
280+ as before.
281+
282+ #### hidden hide/show strategy
283+
284+ A new built-in [ ` hide ` /` show ` ] ( /commands/hide ) strategy uses the native ` hidden ` attribute:
285+
286+ ``` hyperscript
287+ hide me with hidden
288+ show me with hidden
289+ ```
290+
291+ Set it as the default for your whole app:
292+
293+ ``` js
294+ _hyperscript .config .defaultHideShowStrategy = " hidden"
295+ ```
296+
250297### New Expressions & Syntax
251298
252299#### Collection Expressions
253300
254301Filter, sort, map, split, and join collections with postfix expressions that chain naturally.
255- [ ` it ` /` its ` ] ( /expressions/it ) refer to the current element:
302+ [ ` it ` /` its ` ] ( /expressions/it ) refer to the current element. In a ` for ` loop, the ` where `
303+ clause can also use the loop variable name directly:
256304
257305``` hyperscript
258306items where its active sorted by its name mapped to its id
259307"banana,apple,cherry" split by "," sorted by it joined by ", "
260308<li/> in #list where it matches .visible
309+ for x in items where x.score > 10 ...
261310```
262311
263312#### clipboard and selection
0 commit comments