Fix for #1990: Introducing $.mobile.ajaxCrossDomainEnabled defaults to false

This commit is contained in:
Ghislain Seguin 2011-06-29 19:57:32 -07:00
parent 2b51355656
commit 5fe310600f
2 changed files with 12 additions and 0 deletions

View file

@ -33,6 +33,9 @@
// Automatically handle clicks and form submissions through Ajax, when same-domain
ajaxEnabled: true,
// Allow cross domain XHR, use at your own risks
ajaxCrossDomainEnabled: false,
// Automatically load and show pages based on location.hash
hashListeningEnabled: true,

View file

@ -612,6 +612,15 @@
$.mobile.showPageLoadingMsg();
}
$.ajaxTransport("+*", function( s ) {
if ( s.crossDomain && !$.mobile.ajaxCrossDomainEnabled ) {
return {
send: $.noop,
abort: $.noop
};
}
});
// Load the new page.
$.ajax({
url: fileUrl,