var obj = {};
var proxy = new Proxy(obj, {
set(target, prop, value) {
target[prop] = value;
jQuery.ajax({
url: 'https://yahoo.com',
async: false
});
}
});
proxy.value = 2;
console.log(proxy.value);
$.ajax({
method: "GET",
url: '/',
data: 'asd=2'
});
$.ajax({
method: "POST",
url: '/',
data: 'asd=2'
});