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:
Kin Blas 2011-06-16 15:43:40 -07:00
parent 0ec7c3c54a
commit 96b3e710d4

View file

@ -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