From cd4a9cd7fa7093df92e64d5da9f18742254a8ca7 Mon Sep 17 00:00:00 2001 From: Timmy Willison Date: Mon, 9 Sep 2013 11:39:02 -0400 Subject: All non-var modules should not indent in their AMD wrappers (just for prettier builds). No functionality changes. --- src/ajax/parseJSON.js | 5 +++-- src/ajax/parseXML.js | 40 +++++++++++++++++++++------------------- 2 files changed, 24 insertions(+), 21 deletions(-) (limited to 'src/ajax') diff --git a/src/ajax/parseJSON.js b/src/ajax/parseJSON.js index 9d2ada95b..e8c449bca 100644 --- a/src/ajax/parseJSON.js +++ b/src/ajax/parseJSON.js @@ -2,7 +2,8 @@ define([ "../core" ], function( jQuery ) { - jQuery.parseJSON = JSON.parse; +jQuery.parseJSON = JSON.parse; + +return jQuery.parseJSON; - return jQuery.parseJSON; }); diff --git a/src/ajax/parseXML.js b/src/ajax/parseXML.js index 9103c3d6f..aa80e3620 100644 --- a/src/ajax/parseXML.js +++ b/src/ajax/parseXML.js @@ -1,26 +1,28 @@ define([ "../core" ], function( jQuery ) { - // Cross-browser xml parsing - jQuery.parseXML = function( data ) { - var xml, tmp; - if ( !data || typeof data !== "string" ) { - return null; - } - // Support: IE9 - try { - tmp = new DOMParser(); - xml = tmp.parseFromString( data , "text/xml" ); - } catch ( e ) { - xml = undefined; - } +// Cross-browser xml parsing +jQuery.parseXML = function( data ) { + var xml, tmp; + if ( !data || typeof data !== "string" ) { + return null; + } - if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) { - jQuery.error( "Invalid XML: " + data ); - } - return xml; - }; + // Support: IE9 + try { + tmp = new DOMParser(); + xml = tmp.parseFromString( data , "text/xml" ); + } catch ( e ) { + xml = undefined; + } + + if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) { + jQuery.error( "Invalid XML: " + data ); + } + return xml; +}; + +return jQuery.parseXML; - return jQuery.parseXML; }); -- cgit v1.2.3