jpillora / xdomain

A pure JavaScript CORS alternative
https://jpillora.com/xdomain/
3.12k stars 269 forks source link

XMLHttpRequest load event not scoped to the request #170

Open edzis opened 8 years ago

edzis commented 8 years ago

Is there a reason why the load event is not scoped to the XMLHttpRequest instance it was caused from? Please see https://github.com/mrdoob/three.js/pull/7297

jpillora commented 8 years ago

This is an XHook issue. I think it's just a matter of changing https://github.com/jpillora/xhook/blob/gh-pages/src/xhook.coffee#L46

dst[FIRE] event, clone

to

dst[FIRE].call src, event, clone

(Sorry for the CoffeeScript, old project)