withExtensions catches and logs any exceptions0ms ‣
htmx.defineExtension('ext-prevent-request', {
onEvent: function(name, evt) {
if (name === 'htmx:beforeRequest') {
evt.preventDefault()
}
}
})
var div = make('<div hx-ext="ext-prevent-request">Foo</div>')
htmx._('withExtensions')(div, function(extension) {
throw new Error('throw error to catch and log')
})