I found that I cannot call functions asyncwith $.proxy. My thing was that I approximated event listeners so that they still had the same context, but as soon as I tried to proxy the function async, it just wasn't called - there were no errors either.
Can someone explain to me why this is not working?
The simple example below will allow you to reproduce the problem. If a keyword exists async, the function will not be called. When you uninstall async, it will start working.
$('div').on('click', $.proxy(example, this));
async function example() {
console.log('test');
}
source
share