mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-16 22:10:25 +00:00
Added utility functions $.mobile.getDocumentBase() and $.mobile.getDocumentUrl() so that developers can retrieve the original base and url used when loading the document.
This commit is contained in:
parent
0ec7c3c54a
commit
96b3e710d4
1 changed files with 10 additions and 0 deletions
|
|
@ -490,6 +490,16 @@
|
|||
//enable cross-domain page support
|
||||
$.mobile.allowCrossDomainPages = false;
|
||||
|
||||
//return the original document url
|
||||
$.mobile.getDocumentUrl = function(asParsedObject) {
|
||||
return asParsedObject ? $.extend( {}, documentUrl ) : documentUrl.href;
|
||||
};
|
||||
|
||||
//return the original document base url
|
||||
$.mobile.getDocumentBase = function(asParsedObject) {
|
||||
return asParsedObject ? $.extend( {}, documentBase ) : documentBase.href;
|
||||
};
|
||||
|
||||
// Load a page into the DOM.
|
||||
$.mobile.loadPage = function( url, options ) {
|
||||
// This function uses deferred notifications to let callers
|
||||
|
|
|
|||
Loading…
Reference in a new issue