Skip to content

Commit

Permalink
Use $.proxy instead of one line function
Browse files Browse the repository at this point in the history
  • Loading branch information
gseguin committed May 17, 2012
1 parent ba33844 commit 4b401fe
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions js/jquery.mobile.navigation.pushstate.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,9 @@ define( [ "jquery", "./jquery.mobile.navigation", "../external/requirejs/depend!
mobileinitDeferred = $.Deferred(),
domreadyDeferred = $.Deferred();

$( document ).ready( function() {
domreadyDeferred.resolve();
});
$( document ).ready( $.proxy( domreadyDeferred, "resolve" ) );

$( document ).one( "mobileinit", function() {
mobileinitDeferred.resolve();
});
$( document ).one( "mobileinit", $.proxy( mobileinitDeferred, "resolve" ) );

$.extend( pushStateHandler, {
// TODO move to a path helper, this is rather common functionality
Expand Down

0 comments on commit 4b401fe

Please sign in to comment.