aboutsummaryrefslogtreecommitdiffstats
path: root/src/ajax
diff options
context:
space:
mode:
authorTimmy Willison <timmywillisn@gmail.com>2013-09-09 11:39:02 -0400
committerTimmy Willison <timmywillisn@gmail.com>2013-09-09 12:08:00 -0400
commitcd4a9cd7fa7093df92e64d5da9f18742254a8ca7 (patch)
treea08288e1726e9b5a424e7ef9dac6769dc3a4e268 /src/ajax
parent3b53b75160606610cc8f87404f89fc9e10441c4b (diff)
downloadjquery-cd4a9cd7fa7093df92e64d5da9f18742254a8ca7.tar.gz
jquery-cd4a9cd7fa7093df92e64d5da9f18742254a8ca7.zip
All non-var modules should not indent in their AMD wrappers (just for prettier builds). No functionality changes.
Diffstat (limited to 'src/ajax')
-rw-r--r--src/ajax/parseJSON.js5
-rw-r--r--src/ajax/parseXML.js40
2 files changed, 24 insertions, 21 deletions
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;
});