@@ -45,14 +45,8 @@ define([ "jquery", "./events/navigate", "./path", "./history" ], function( $ ) {
4545 return state ;
4646 } ,
4747
48- // TODO reconsider name
49- go : function ( url , data , noEvents ) {
50- var state , href , parsed , loc , hash , popstateEvent ,
51- isPopStateEvent = $ . event . special . navigate . isPushStateEnabled ( ) ,
52- resolutionUrl = path . isPath ( url ) ? path . getLocation ( ) : path . getDocumentUrl ( ) ;
53-
54- // Get the url as it would look squashed on to the current resolution url
55- href = path . squash ( url ) ;
48+ hash : function ( url , href ) {
49+ var parsed , loc , hash ;
5650
5751 // Grab the hash for recording. If the passed url is a path
5852 // we used the parsed version of the squashed url to reconstruct,
@@ -73,6 +67,20 @@ define([ "jquery", "./events/navigate", "./path", "./history" ], function( $ ) {
7367 hash = url ;
7468 }
7569
70+ return hash ;
71+ } ,
72+
73+ // TODO reconsider name
74+ go : function ( url , data , noEvents ) {
75+ var state , href , hash , popstateEvent ,
76+ isPopStateEvent = $ . event . special . navigate . isPushStateEnabled ( ) ;
77+
78+ // Get the url as it would look squashed on to the current resolution url
79+ href = path . squash ( url ) ;
80+
81+ // sort out what the hash sould be from the url
82+ hash = this . hash ( url , href ) ;
83+
7684 // Here we prevent the next hash change or popstate event from doing any
7785 // history management. In the case of hashchange we don't swallow it
7886 // if there will be no hashchange fired (since that won't reset the value)
0 commit comments