News for hackers. Stuff that matters.
Re:Show HN: µJS, a 5KB alternative to Htmx and Turbo with ze... by lioeters on Saturday March 07, 2026 @02:04PM (#47290488)
Looks useful! I skimmed through the docs and had a question.

Is there a mechanism for loading HTML partials that require additional style or script file? And possibly a way to trigger a JS action when loaded? For example, loading an image gallery.

Re:Show HN: µJS, a 5KB alternative to Htmx and Turbo with ze... by amaury_bouchard on Saturday March 07, 2026 @06:59PM (#47292768)
Yes! `<script>` and `<style>` tags found in the fetched content are processed on the fly, as long as they haven't been loaded already. So you can include a gallery-specific stylesheet or script directly in the partial, and µJS will inject and execute them automatically. For triggering a JS action after rendering, the `mu:after-render` event is the right hook.
Re:Show HN: µJS, a 5KB alternative to Htmx and Turbo with ze... by lioeters on Saturday March 07, 2026 @09:07PM (#47293607)
I see, simple! Thanks, I look forward to exploring uJS further.