hi everyone! I am trying to stop an out of band sw...
# htmx-general
s
hi everyone! I am trying to stop an out of band swap in the presence of a specific header in the response, but I am not being able to find the xhr property in the events detail property:
Copy code
<script>
htmx.defineExtension('exclude-from-oob-swap', {
     onEvent: function (name, evt) {
           if(name === "htmx:oobBeforeSwap"){
               console.log(name);
               console.log(evt.detail);
               console.log(evt.detail.xhr);
               console.log(evt.xhr);
           }
     }
});
</script>
Am I approaching something the wrong way?? Thanks for further answers!