Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
Added utility functions $.mobile.getDocumentBase() and $.mobile.getDo…
Browse files Browse the repository at this point in the history
…cumentUrl() so that developers can retrieve the original base and url used when loading the document.
  • Loading branch information
jblas committed Jun 16, 2011
1 parent 0ec7c3c commit 96b3e71
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions js/jquery.mobile.navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 96b3e71

Please sign in to comment.