Test for existence of XMLHttpRequest in window fails in SOME IE8s #7

Closed
mplungjan opened this Issue Nov 22, 2012 · 2 comments

Projects

None yet

3 participants

@mplungjan

&& !('XMLHttpRequest' in window && 'withCredentials' in new XMLHttpRequest()) // and must not support CORS (IE10+)

works if you replace it with

&& !(window.XMLHttpRequest && 'withCredentials' in new XMLHttpRequest()) // and must not support CORS (IE10+)

@mathieucarbou
Member

weird... Why this one fails and not the 'withCredentials' in new XMLHttpRequest()?

@mplungjan

Actually it does. In the first line, the browser fails on the second part because for some reason, the first part returns a truly value

@altus34 altus34 was assigned Nov 23, 2012
@altus34 altus34 added a commit that referenced this issue Nov 23, 2012
@altus34 altus34 Fix Issue #7 43a0b7b
@altus34 altus34 closed this Nov 23, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment