Skip to content

Commit b8f8416

Browse files
committed
more docs on release
1 parent f90a8bf commit b8f8416

2 files changed

Lines changed: 53 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
Hoooooo doggie, it's been a year of on and off work, and we finally had some time to focus on hyperscript!
66

7-
This is a *major* change/upgrade, including reworking the entire codebase to be much more sensible (and understandable
8-
to my students)
7+
This is a *major* change/upgrade, including restructuring the entire codebase to be much more understandable by my students
8+
as well as anyone else interested in the langauge.
99

1010
Here we go...
1111

www/posts/2026-03-29-hyperscript-0.9.90-is-released.md

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ date: 2026-03-29
88
## hyperscript 0.9.90 Release
99

1010
We 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

1314
There 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'
247248
This works with any [assignable expression](/commands/set) - variables, properties, style refs - and
248249
supports 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

254301
Filter, 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
258306
items 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

Comments
 (0)