Open GoogleCodeExporter opened 8 years ago
Actually, getCurrentLocation is used internally by RSH and shouldn't be accessed
directly by your application. I should probably make it private. To react to
history
changes, you should use .addListener() to register your own history listener.
With
each history change, your listener will then be fired and passed two
parameters: the
current key (the part of the url after the #) and the value stored in RSH's
history
stack.
To see this in action, dig through the source code of rshTestPage.html.
Additional
usage examples will be included with the final release of RSH 0.6.
Original comment by bdpathfi...@gmail.com
on 16 Nov 2007 at 1:25
I'm going to leave this issue open as a reminder to take a careful look at which
methods of RSH are truly public and mark all the others private. Now that the
code
forks and uses a separate mechanism for safari, getCurrentLocation should be
private
the same way the Safari methods are - it's not safe to call from application
code.
Original comment by bdpathfi...@gmail.com
on 16 Nov 2007 at 1:27
I bumped into this one too. I found getCurrentHash() a suitable replacement
for what I was doing, assuming that
one remains public.
Original comment by tlia...@gmail.com
on 19 Nov 2007 at 6:36
getCurrentHash is not going to remain public; it's an internal method and
should have
been private all along.
These methods are all helper mechanisms for the main public methods of
historyStorage
and dhtmlHistory. Can anyone explain to me why they'd want to call them
directly? Are
you just trying to perform some application logic related to the startup of your
application? If so, couldn't you just write your own function to examine
window.location?
If people really want a convenience method, I could probably debug the problem
with
getCurrentLocation and make sure it works as expected in Safari. Though I
wonder if
somebody could post their actual code so I can see how they're trying to use it
and
debug in Safari.
Original comment by bdpathfi...@gmail.com
on 20 Nov 2007 at 10:39
I was looking for the "official" way to get the current history string from the
framework, in case reading location.hash was not the preferred approach. The
code
for getCurrentLocation() made me think it was the way to go, in particular
because it
dealt with Safari differently.
I don't think there's a need for a convenience method.
Original comment by imad.yam...@gmail.com
on 21 Nov 2007 at 3:30
Original issue reported on code.google.com by
imad.yam...@gmail.com
on 15 Nov 2007 at 6:30