mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-16 22:10:25 +00:00
Merge remote branch 'origin/master'
This commit is contained in:
commit
a545e5d361
1 changed files with 12 additions and 1 deletions
|
|
@ -279,6 +279,9 @@
|
|||
//history stack
|
||||
$.mobile.urlHistory = urlHistory;
|
||||
|
||||
//enable cross-domain page support
|
||||
$.mobile.allowCrossDomainPages = false;
|
||||
|
||||
// changepage function
|
||||
$.mobile.changePage = function( to, transition, reverse, changeHash, fromHashChange ){
|
||||
//from is always the currently viewed page
|
||||
|
|
@ -667,10 +670,18 @@
|
|||
//rel set to external
|
||||
isEmbeddedPage = path.isEmbeddedPage( url ),
|
||||
|
||||
// Some embedded browsers, like the web view in Phone Gap, allow cross-domain XHR
|
||||
// requests if the document doing the request was loaded via the file:// protocol.
|
||||
// This is usually to allow the application to "phone home" and fetch app specific
|
||||
// data. We normally let the browser handle external/cross-domain urls, but if the
|
||||
// allowCrossDomainPages option is true, we will allow cross-domain http/https
|
||||
// requests to go through our page loading logic.
|
||||
isCrossDomainPageLoad = ($.mobile.allowCrossDomainPages && location.protocol === "file:" && url.search(/^https?:/) != -1),
|
||||
|
||||
//check for protocol or rel and its not an embedded page
|
||||
//TODO overlap in logic from isExternal, rel=external check should be
|
||||
// moved into more comprehensive isExternalLink
|
||||
isExternal = path.isExternal( url ) || (isRelExternal && !isEmbeddedPage),
|
||||
isExternal = (path.isExternal(url) && !isCrossDomainPageLoad) || (isRelExternal && !isEmbeddedPage),
|
||||
|
||||
//if target attr is specified we mimic _blank... for now
|
||||
hasTarget = $this.is( "[target]" ),
|
||||
|
|
|
|||
Loading…
Reference in a new issue