jpillora / xdomain

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

Facade responseText should default to empty string #205

Closed hrobertson closed 6 years ago

hrobertson commented 6 years ago

As per the XMLHttpRequest spec, the responseText property should default to an empty string. Using xdomain it is undefined until the readyState reaches 4.

I am attempting to use a third party library which correctly does not expect responseText to be undefined and therefore breaks.

Defaulting emitter.responseText to '' would resolve this issue.

hrobertson commented 6 years ago

Realised this is an issue of https://github.com/jpillora/xhook rather than xdomain.