Skip to content

Conversation

Renerick
Copy link
Collaborator

@Renerick Renerick commented Apr 24, 2024

Description

This PR improves htmx extension registration by allowing extensions to contribute to the selector used in findElementsToProcess. This change makes extension initialization much simpler since it can just inform htmx about what elements it want to process without the need to look for them in processed fragments. This change nicely avoids double processing issue since deduplication logic is implemeted by querySelectorAll

Corresponding issue: bigskysoftware/htmx-extensions#16

Testing

Since 2.0 repo has no extension, tests for this behavior are added to corresponding extension directory over at bigskysoftware/htmx-extensions

see bigskysoftware/htmx-extensions#18

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

@1cg 1cg merged commit 45d45c3 into dev Apr 25, 2024
@Renerick Renerick deleted the extensions-getSelectors branch April 25, 2024 20:56
@MichaelWest22 MichaelWest22 mentioned this pull request Jul 12, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.0 enhancement New feature or request extension Consideration for an extension
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants