← This Week in HTMX

Issue № 2: Three out of Thirty Nine

, Deniz Akşimşek

3 htmx talks were given at DjangoCon US 2021!

The conference over this weekend featured these talks from members of the htmx community:

Recordings are available at the DjangoCon US YouTube channel.

💙 to DjangoCon organizers & the whole Django community!

Rashad started a lovely conversation about Haskell & htmx

The conversation is quite long, so I’ve put it inside this convenient <details> element:

monadposting on main

tinycode2 talked about using htmx with microfrontends

Daniel made Bootstrap modals work with htmx

And later:

We’re excited for it, Daniel! No pressure though…

An inconsistency in _hyperscript syntax was fixed

Currently, the send command can dispatch events on other elements, but trigger cannot:

send evt            -- works, dispatches on "me"
send evt to #elt -- works, dispatches on #elt
trigger evt -- works, dispatches on "me"
trigger evt on #elt -- syntax error!

This will no longer be the case in the next release of _hyperscript.


htmx & _hyperscript were mentioned on devMode.fm

devMode already has an episode on htmx featuring Carson, but the latest episode mentions it as well, near the end.

Andrew Welch: You’ve heard of HTMX?

Chris Ferdinandi: Yes, but I can’t for the life of me-

AW: So, HTMX —real quick, like thirty seconds— HTMX —this is going to be not on the show anyway— HTMX is basically- Carson, the guy who made it, kind of considers HTML, the standards body, stopped, and they really needed to do more to allow for some dynamicism [sic] and he is kind of on your page in terms of that he thinks these libraries and things are a bit crazy. So, he wrote an extension to HTML that kind of fills in the missing gaps and allows for that interactivity and stuff. It’s a really interesting library and we did a show on it if you ever want to listen about it. But then, he also – this is the question I want to ask you about, and you can just think about it – he’s also working on a project _hyperscript which is like HyperTalk from the old HyperCard days. So, it’s an interpreted language that you put in your browser that JavaScript then interprets and decodes and runs. And I think it’s just absolutely crazy [laughter] but anyway,

CF: That’s weird. I’m gonna have to check that.

💙 to the devMode.fm podcast! (and apologies for my mediocre transcription skills)


Richard appreciated syntax highlighting for _hyperscript

It highlights code inside of HTML, even marks event names!

The _hyperscript plugin for Visual Studio Code adds syntax highlighting, even for code embedded in HTML! The newest version supports _hyperscript in Markdown code blocks. Try it out:

I’ve also just started writing a tree-sitter grammar, for those who are into that sort of thing: https://github.com/dz4k/tree-sitter-_hyperscript