Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions src/htmx.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ var htmx = (function() {
htmx.logNone = logNone
htmx.parseInterval = parseInterval
htmx._ = internalEval
htmx.bootstrap = bootstrap

const internalAPI = {
addTriggerHandler,
Expand Down Expand Up @@ -5108,8 +5109,13 @@ var htmx = (function() {
}
}

// initialize the document
ready(function() {
let isBootstrapped = false
function bootstrap() {
if (isBootstrapped) {
return
}
isBootstrapped = true
// initialize the document
mergeMetaConfig()
insertIndicatorStyles()
let body = getDocument().body
Expand Down Expand Up @@ -5146,7 +5152,9 @@ var htmx = (function() {
triggerEvent(body, 'htmx:load', {}) // give ready handlers a chance to load up before firing this event
body = null // kill reference for gc
}, 0)
})
}

ready(bootstrap)

return htmx
})()
Expand Down