You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
396 B
JavaScript
18 lines
396 B
JavaScript
5 years ago
|
|
||
|
/**
|
||
|
* Module exports.
|
||
|
*
|
||
|
* Logic borrowed from Modernizr:
|
||
|
*
|
||
|
* - https://github.com/Modernizr/Modernizr/blob/master/feature-detects/cors.js
|
||
|
*/
|
||
|
|
||
|
try {
|
||
|
module.exports = typeof XMLHttpRequest !== 'undefined' &&
|
||
|
'withCredentials' in new XMLHttpRequest();
|
||
|
} catch (err) {
|
||
|
// if XMLHttp support is disabled in IE then it will throw
|
||
|
// when trying to create
|
||
|
module.exports = false;
|
||
|
}
|