fix(rn,polyfills) remove no longer needed polyfill

This commit is contained in:
Saúl Ibarra Corretgé 2022-04-05 15:53:43 +02:00 committed by Saúl Ibarra Corretgé
parent c05a983c98
commit a451923ec9
1 changed files with 0 additions and 23 deletions

View File

@ -295,29 +295,6 @@ function _visitNode(node, callback) {
require('react-native-callstats/csio-polyfill'); require('react-native-callstats/csio-polyfill');
global.callstats = require('react-native-callstats/callstats'); global.callstats = require('react-native-callstats/callstats');
// XMLHttpRequest
if (global.XMLHttpRequest) {
const { prototype } = global.XMLHttpRequest;
// XMLHttpRequest.responseXML
//
// Required by:
// - Strophe
if (prototype && !prototype.hasOwnProperty('responseXML')) {
Object.defineProperty(prototype, 'responseXML', {
get() {
const { responseText } = this;
return (
responseText
&& new DOMParser().parseFromString(
responseText,
'text/xml'));
}
});
}
}
// Timers // Timers
// //
// React Native's timers won't run while the app is in the background, this // React Native's timers won't run while the app is in the background, this