1
0
Fork 0
forked from 0x2620/oxjs

expose async flag to disable it for window.unload events

This commit is contained in:
j 2025-07-06 20:23:54 +01:00
commit f8e48f54ca

View file

@ -25,6 +25,7 @@ Ox.Request = (function() {
$element; $element;
return { return {
async: true,
/*@ /*@
bindEvent <f> Bind event bindEvent <f> Bind event
@ -139,6 +140,7 @@ Ox.Request = (function() {
} else { } else {
pending[req] = true; pending[req] = true;
$.ajax({ $.ajax({
async: Ox.Request.async,
beforeSend: function(request) { beforeSend: function(request) {
var csrftoken = Ox.Cookies('csrftoken'); var csrftoken = Ox.Cookies('csrftoken');
if (csrftoken) { if (csrftoken) {