bigskysoftware / bigskysoftware/htmx

[4.0.0-beta4] hx-preload doesn't support "intersect" or "revealed"

Open
#3,819 6 comments 0 reactions 0 assignees View on GitHub
htmx 4
Dominant language
JavaScript
Stars
49.4k
Forks
1.7k
Avg merge
3d 22h
Merged PRs (30d)
30

Description

I hope there’s an aggressive way to prefetch links on mobile **when a link enters the viewport**.

Google has also been promoting the [Speculation Rules API](https://developer.chrome.com/docs/web-platform/implementing-speculation-rules) lately, which allows prefetching and prerendering pages in the background. So I was hoping HTMX would have something similar to it.

While HTMX 4 documents that “[_Preload can listen to any event name supported by htmx trigger specs._](https://four.htmx.org/extensions/hx-preload#hx-preloadcustom-event-name)", it doesn’t support `intersect` or `revealed` (because they aren’t regular events?). In that case, “supported by htmx trigger specs” sounds ambiguous.

Image

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.