diff options
Diffstat (limited to 'src/ajax')
-rw-r--r-- | src/ajax/parseXML.js | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/ajax/parseXML.js b/src/ajax/parseXML.js deleted file mode 100644 index d547eab53..000000000 --- a/src/ajax/parseXML.js +++ /dev/null @@ -1,24 +0,0 @@ -import jQuery from "../core.js"; - -// Cross-browser xml parsing -jQuery.parseXML = function( data ) { - var xml; - if ( !data || typeof data !== "string" ) { - return null; - } - - // Support: IE 9 - 11+ - // IE throws on parseFromString with invalid input. - try { - xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); - } catch ( e ) { - xml = undefined; - } - - if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) { - jQuery.error( "Invalid XML: " + data ); - } - return xml; -}; - -export default jQuery.parseXML; |