Skip to content

update hx-live to use xpath and handle alpine conflict#3820

Merged
1cg merged 1 commit into
bigskysoftware:four-devfrom
MichaelWest22:hx-live-prefix
Jun 8, 2026
Merged

update hx-live to use xpath and handle alpine conflict#3820
1cg merged 1 commit into
bigskysoftware:four-devfrom
MichaelWest22:hx-live-prefix

Conversation

@MichaelWest22

@MichaelWest22 MichaelWest22 commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

Description

hx-live should use xpath for more efficient scanning of hx-live:* attributes as it currently does inefficient full scans.

Also need to address the alpine compatibility issue. Alpine uses the same :attr form as the proposed hx-live parsing and if they are both enabled then they both try and register the same behavior and the different syntaxes causes errors. While we could move to a safer default short bind form like live:attr or hx:attr or _attr none of them are as nice and well understood as the alpine pattern. So to avoid conflicts we could detect alpine and disable the default : short form prefix and post a warning to the console so users can opt in or out of the short form or pick an alternative short form.

Corresponding issue:

Testing

Please explain how you tested this change manually, and, if applicable, what new tests you added. If
you're making a change to just the website, you can omit this section.

Checklist

  • I have read the contribution guidelines
  • I have targeted this PR against the correct branch (master for website changes, dev for
    source changes)
  • This is either a bugfix, a documentation update, or a new feature that has been explicitly
    approved via an issue
  • I ran the test suite locally (npm run test) and verified that it succeeded

@MichaelWest22 MichaelWest22 added the htmx 4 Issues specific to htmx version 4 label Jun 4, 2026
@1cg 1cg merged commit 6e664c3 into bigskysoftware:four-dev Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

htmx 4 Issues specific to htmx version 4

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants