dojo.undo.browser test
Required steps for using dojo.undo.browser:
- dojo.require("dojo.undo.browser");
- Define preventBackButtonFix: false in your djConfig.
- Look at the source of this page to see how dojo.undo.browser.addToHistory()
and dojo.undo.browser.setInitialState() are used.
This page tests the dojo.undo.browser back/forward code. Click on the
buttons to create a navigation history, then use the browser back/forward
buttons to try out the code. You should see messages in the Back/Forward
Info section of the page indicating that a back or forward action was
detected. The Data Output section should also update to the correct
data for that point in the navigation history.
The buttons that start with "Link" on them don't use any dojo.io calls,
just JS data already in the page. The buttons that start with "XHR" use
dojo.io.bind to do some XMLHTTPRequest calls for some test data, and they
also define back/forward handlers, so dojo.io should use dojo.undo.browser
add to history tracking.
If the Change URL checkbox is checked, then the test
links/io.binds will ask dojo.undo.browser to change the URL (done by adding
a unique hash to the URL in the browser location bar). If Use Bookmark URL
checkbox is checked, then a logical link name is used for the URL so it can be
bookmarked. Other notes:
- Do not mix dojo.undo.browser.addToHistory() calls that use changeUrl
with ones that do not use changeUrl. Always use one or the other. If you are
using changeUrl, you don't always have to provide a string for the value, but
at least set it to true to get an auto-generated URL hash.
- Don't test this page using local disk for MSIE. MSIE will not
create a history list for iframe_history.html if served from a file:
URL. The XML served back from the XHR tests will also not be properly
created if served from local disk. Serve the test pages from a web
server to test in that browser.
- Safari 2.0.3+ (and probably 1.3.2+): Only the back button works OK
(not the forward button), and only if changeUrl is NOT used.
When changeUrl is used, Safari jumps all the way
back to whatever page was shown before the page that uses
dojo.undo.browser support.
- Opera 8.5.3: Does not work.
- Konqueror: Unknown. The latest may have Safari's behavior.