Skip to content

Commit

Permalink
Fallback for Safari. Fixes bigskysoftware/htmx#2504
Browse files Browse the repository at this point in the history
  • Loading branch information
michrome committed May 17, 2024
1 parent cac304a commit 51b11d4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/preload/preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ htmx.defineExtension('preload', {
}

// Search for all child nodes that have a "preload" attribute
event.target.querySelectorAll('[preload]').forEach(function(node) {
const parent = event.target || event.detail.elt;
parent.querySelectorAll("[preload]").forEach(function(node) {
// Initialize the node with the "preload" attribute
init(node)

Expand Down

0 comments on commit 51b11d4

Please sign in to comment.