From: Brad C. <bc...@bo...> - 2003-09-18 14:51:41
|
Currently it doesn't even keep up with history for javascript to use, but we've written a "WebBrowser" wrapper for HtmlUnit that does this sort of thing for us by keeping a reference to whatever Page you want to go back to and using WebWindow.setEnclosedPage() on your current window. The WebBrowser keeps up with what's changing to store the "history" and creates new "WebBrowserTab"s (to isolate the history to each window) by using a WebWindowListener. <probe for interest> I'd offer some code to you but it's currently pretty tied to our product, though we are working to separate it out and either contribute to HtmlUnit or release as a new product. If it's added to HtmlUnit it might be possible to have the javascript use the WebBrowser for it's history support. </probe for interest> Brad C At 09:29 AM 9/18/2003, Jon Kleiser wrote: >Hi, > >In my little HtmlUnit project I have a WebClient wc, and a Page p which >get updated as I'm "browsing around". Now and then I may want to go back >to the previous page. Does HtmlUnit provide a mechanism for doing a Back, >or do I have to keep track of old requests myself? |