Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 83422

Summary: [browser] History list support
Product: [Eclipse Project] Platform Reporter: Christophe Cornu <christophe.cornu+eclipse>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3 CC: akurtakov, bpasero, capelli, carolynmacleod4, chrriis, ericwill, markus.kell.r, sw
Version: 3.1Keywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:

Description Christophe Cornu CLA 2005-01-21 12:05:30 EST
Investigate ways to manage the history list in a portable manner in the 
Browser widget.
Comment 1 Grant Gayed CLA 2009-08-28 14:22:13 EDT
Moving report to triage, see http://www.eclipse.org/swt/triage.php
for more info about swt bug triaging.
Comment 2 Christopher Deckers CLA 2009-11-15 13:48:41 EST
First, I hope I understand this bug report correctly. For me, this is talking about relative navigation, multiple checkpoints at a time, as well as querying what the various checkpoints are. If I misunderstand, then let me know and I would open a new feature request.

Now, I think it would be great to have such support: I had the request several times by user of my library (which uses the SWT Browser).

I can think of such API:
String[] Browser.getBackHistory();
String[] Browser.getForwardHistory();

These methods would return an array of the page titles of the different history checkpoints.
"Back history" is from more recent to oldest, "forward history" is from oldest to newest, which is essentially the order of items in respective popup menus of browser history buttons.

Then to navigate to one of these points, you would use:
public boolean back (int count)
public boolean forward (int count)

where "count" is equal to "indexInBackHistoryList + 1" and "indexInForwardHistoryList + 1" respectively.

What do you think?
Comment 3 Alexander Kurtakov CLA 2022-02-23 13:03:01 EST
JS should be the way to do it https://developer.mozilla.org/en-US/docs/Web/API/History_API