Okay Ahmad, thanks again! Let me know if you find something out.
I haven’t been able to fix it, though I think it’s something related to the asynchrony of Javascript.
As I said before, the code’s working, because since status is false, it gets into the if clause but somehow, reject isn’t working.
As you said, reject isn’t the issue though, because if I only write reject() in the event handler, it works well.
Thank you again!