Skip to content

async head support - #3686

Merged
1cg merged 2 commits into
bigskysoftware:four-devfrom
MichaelWest22:async-head
Mar 10, 2026
Merged

async head support#3686
1cg merged 2 commits into
bigskysoftware:four-devfrom
MichaelWest22:async-head

Conversation

@MichaelWest22

Copy link
Copy Markdown
Collaborator

Description

Update hx-head extension to support async script loading. It now detects script tags that should be awaited so they are ready before the main body contents is swapped in like full page loads and treats script tags with async as fire and forget. And for defer script tags it delays applying them till after the swap to make these also closer to how they work in full page loads.

Corresponding issue:

Testing

Added missing tests for hx-head extension.

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 Mar 8, 2026
@1cg
1cg merged commit d29bc6a into bigskysoftware:four-dev Mar 10, 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