Skip to main content

Bug Tracker

Side navigation

Ticket #4977: jsonSupport.patch
File jsonSupport.patch, 0.4 KB (added by umbrae, November 16, 2009 12:35AM UTC)

Adds '$.support' checking for native JSON

diff --git a/src/support.js b/src/support.js
index 332839d..1aa5318 100644
--- a/src/support.js
+++ b/src/support.js
@@ -46,6 +46,9 @@
 		// (IE uses styleFloat instead of cssFloat)
 		cssFloat: !!a.style.cssFloat,
 
+		// Check to see if we have a native JSON parser
+		json: typeof JSON === "object" && JSON.parse,
+
 		// Will be defined later
 		scriptEval: false,
 		noCloneEvent: true,

Download in other formats:

Original Format