We have a situation, where we need to onclick-open a new tab in browsers after performing an XHR / Ajax request.
We do this by setti
Hello @ChristopherLörken. Can you give a example code or a fiddle of what are you doing? Maybe I'm not understanding what you want.
I think this will help:
If you need the event in your context, you can save the reference of the event for posterior use, like in a callback.
Example using jQuery:
$(myBtn).click(function(ev){
var event = ev; //Save the event object reference
$.ajax({
// ... your options
success: function(res){
//do stuff with the event in the callback
console.log(event);
});
});
In this way, you don't need call a sync request to use the event in your context and, as a async request, chrome don't complain with that. :)