mastodontech.de ist einer von vielen unabhängigen Mastodon-Servern, mit dem du dich im Fediverse beteiligen kannst.
Offen für alle (über 16) und bereitgestellt von Markus'Blog

Serverstatistik:

1,4 Tsd.
aktive Profile

#websocket

0 Beiträge0 Beteiligte0 Beiträge heute

New Kitten release 🎉

kitten.small-web.org

• New: Lovely new icons¹ and new callouts in Kitten Settings²

• New: Markdown now supports attributes and bracketed spans³

• New: client-side `kitten` global with `trigger` function for triggering events on the server from the client. (Useful when streaming client-side JavaScript when using Kitten’s Streaming HTML⁴ workflow. e.g., when you have to use a client-only web API like the Clipboard API but you want to keep all your logic on your server-side page.⁵)

• Fixed: The bound render function returned by `KittenComponent` class’s `component` getter now correctly awaits asynchronous templates. (In Kitten, you don’t have to care whether your templates contain promises. Kitten handles all that for you.)

Enjoy! :kitten:💕

¹ kitten.small-web.org/reference

² mastodon.ar.al/@aral/114381983

³ kitten.small-web.org/reference (also see mastodon.ar.al/@aral/114381462)

kitten.small-web.org/tutorials

⁵ e.g., See how I use this to implement a copy to clipboard button in the database page of Kitten’s Settings: codeberg.org/kitten/app/src/br Of course, you don’t have to use this and you can just write client-side JavaScript or use the built-in Alpine.js integration. e.g., how I do it on the (older) settings/identity page: codeberg.org/kitten/app/src/br

#Kitten#SmallWeb#web

Eaglercraft is sooo annoying to deal with like plugins that allow a eaglercraft player to join a mc server have ass behavior, eaglerXproxy treats eaglercraft players like online players which means they bypass auth unless you have the internal auth system enabled, but that doesnt work with offline mode players. in addition eaglercraft players lack minecraft channels which means i cant have commands executed if one joins. All of this is terrible behavior and at the end of the day its stupid that they used a custom protocol instead of just putting the normal minecraft protocol in a websocket like mcraft.fun does.

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 attribute exists, 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.¹

kitten.small-web.org

For more details on Kitten’s live pages and automatic message routing, please see the Streaming HTML tutorial:

kitten.small-web.org/tutorials

Enjoy!

:kitten:💕

¹ 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.

#Kitten#SmallWeb#SmallTech

New Kitten release

• Fixes issue with routes where dynamic routes with file names that had more than two extensions were not recognised as the correct type of route. e.g., A route called index.xml.get.js would previously have been treated as a static route instead of a dynamic GET route.

kitten.small-web.org

For more details, see the Valid File Types section of the Kitten reference¹ and the Dynamic Pages tutorial².

Enjoy!

:kitten:💕

¹ kitten.small-web.org/reference
² kitten.small-web.org/tutorials

#Kitten#SmallWeb#server

New Kitten release

• You can now use key paths in the names of your client-side live components and these will automatically be transformed into object hierarchies on the server for you.¹

• Self heals zombie live pages (see Streaming HTML workflow²) if they return to life due to client-side browser cache.³

• Removes htmx⁴ headers from `data` property into separate `header` property in Kitten Page events and the data your Kitten Page message handlers receive.

• Automatically passes references to the live page object (if any) and the request and response objects to the layout templates of Markdown pages⁵ (so you can, for example, check if `request.session.authenticated`⁶ is true from the your layout template and customise the layout accordingly).

kitten.small-web.org

Enjoy!

:kitten:💕

¹ e.g., See codeberg.org/small-tech/site/s (markup) and codeberg.org/small-tech/site/s (handler) and codeberg.org/small-tech/site/s (model class method).

² See Streaming HTML tutorial: kitten.small-web.org/tutorials (There’s actually more to it now but I haven’t had a chance to document the new class-based and event-driven live page workflow yet. It’s experimental but working very well for me so far so I will do so shortly.)

³ When a person leaves a live/connected page (a page connected to its default web socket), we clean up and remove that live page from memory. However, browsers being what they are, cache the page on the client. If a person uses the back/forward buttons to return to the page, the browser will serve the cached source from memory, which has the old page ID, for the page that no longer exists in Kitten’s memory. So now we have a problem. The only way to recover from this is to tell the page to reload itself. So we accept the WebSocket connection, send a command to the page for it to reload itself, and then close the socket. That makes the stale page self heal by replacing itself with a fresh one. Yay, go us!

⁴ HTMX: htmx.org

⁵ Kitten Markdown pages reference: kitten.small-web.org/reference

⁶ See Session tutorial: kitten.small-web.org/tutorials

#Kitten#SmallWeb#SmallTech

Does anyone here have experience with the #azure cognitive services #api in the browser client? I'm getting an unexplainable #websocket error 1006 that's only happening to my user in certain circumstances, and the reason is `undefined`

I'm confident it's not a bad key, because the same code and deployment works for another user.

#boosts welcome, #help please! This is for a #FOSS accessibility project.