onLoad is called... onLoad11ms ‣
this.server.respondWith('GET', '/test', "<div id='d1' hx-get='/test'></div>")
var helper = htmx.onLoad(function(elt) {
elt.setAttribute('foo', 'bar')
})
try {
var div = make("<div id='d1' hx-get='/test' hx-swap='outerHTML'></div>")
div.click()
this.server.respond()
byId('d1').getAttribute('foo').should.equal('bar')
htmx.off('htmx:load', helper)
} catch (error) {
htmx.off('htmx:load', helper)
throw error
}