New Kitten release
• Socket routes now have precendence in the router.
This stops wildcard page routes from capturing the default socket routes that Kitten creates to enable the Streaming HTML workflow.
e.g., Previously, the following route:
/videos/index_[slug].page.js
Could not connect to its default socket (/videos/default.socket) because default.socket would be captured by the [slug] parameter.
Now, it will work as intended as the /videos/default.socket (a socket route) has precendence over index_[slug].page.js (a page route).
Learn more about Kitten’s Streaming HTML workflow here:
https://kitten.small-web.org/tutorials/streaming-html/
Enjoy!
:kitten:💕
#Kitten #SmallWeb #SmallTech #StreamingHTML #routing #NodeJS #web #dev #JavaScript #JS
New Kitten Release
• Automatic message routing: if the element that triggers an event on the client does not have a `name` attribute, Kitten now falls back to using its `id` instead to route the event to the correct server-side event handler on your live Kitten pages. If neither attributes exist, Kitten will fail to route the message but no longer crash as it was due to a regression introduced when I implemented support for colons in element names (a colon in an element name is ignored for message routing purposes, letting you, for example, give unique names to <details> elements, allowing more than one to be open at a time, while having their events be handled by the same handler).
For more details on Kitten’s live pages and automatic message routing, please see the Streaming HTML tutorial:
https://kitten.small-web.org/tutorials/streaming-html/
Enjoy!
:kitten:💕
#Kitten #SmallWeb #SmallTech #web #dev #JavaScript #HTML #CSS #hypermedia #htmx #WebSocket #beautifulDefaults #StreamingHTML
GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.
All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.