mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-24 01:40:25 +00:00
Fix for #1990: Introducing $.mobile.ajaxCrossDomainEnabled defaults to false
This commit is contained in:
parent
2b51355656
commit
5fe310600f
2 changed files with 12 additions and 0 deletions
|
|
@ -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,
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue