Fixed #1557, although it doesn't appear to be just an FF3 problem. In this case, $.getJSON() wasn't working from a remote host. I went ahead and added a unit test then added the s.dataType == "json" test for a remote <script> load. The said that json was allowed but the dataType check was missing. This appears to have fixed the bug across all browsers.

This commit is contained in:
David Serduke 2007-11-29 19:07:20 +00:00
parent 7ac564cd98
commit 4b8f6cdc86
3 changed files with 15 additions and 1 deletions

View file

@ -217,7 +217,7 @@ jQuery.extend({
// If we're requesting a remote document
// and trying to load JSON or Script
if ( !s.url.indexOf("http") && s.dataType == "script" ) {
if ( !s.url.indexOf("http") && ( s.dataType == "script" || s.dataType =="json" ) ) {
var head = document.getElementsByTagName("head")[0];
var script = document.createElement("script");
script.src = s.url;