Closed Bug 1450115 Opened 7 years ago Closed 7 years ago

add gBrowser.canGoBack .canGoForward methods to WX

Categories

(WebExtensions :: Untriaged, enhancement)

52 Branch
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1378651

People

(Reporter: snuz.gary, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 5.1; rv:52.0) Gecko/20100101 Firefox/52.0 Build ID: 20180322140748 Steps to reproduce: looked for an equivalent to gBrowser's canGoBack() and canGoForward methods for checking if such history commands will work. Actual results: I didn't find anything in WX that does this. I tried some tricky workarounds with eventsw and call backs to see if I could detect a page change when calling .back or .forward navigation, none of them worked. Expected results: I need these interfaces or an equivalent. It would be nice to have them available in both content and background (with tab reference) scripts, but only content script is really needing them.
(In reply to snuz.gary@gmail.com from comment #0) > I need these interfaces or an equivalent. A little more detail here would help us evaluate and prioritize this.
Flags: needinfo?(snuz.gary)
Whiteboard: design-decision-needed
before wx, there were the abovementioned methods in gBrowser which return true if the history has an entry to go back or forward to. I don't know what more there is to say than that. you can look up the interfaces in the old gBrowser documentation, but really they are self explanatory. to recap, they return true if the page can navigate back or forward from the current site. when you ask for detail, you should be more specific on what you want. I have no idea from your brief request what you are looking for. i hope this helps.
Flags: needinfo?(snuz.gary)
I was looking for more details on why you need these interfaces available to extensions. I.e., in what scenario will they be used?
In my extension, I assume that if a user wants to navigate back from a tab that has no further back entries, then the user is probably trying to return to the tab that launched and opened that tab, hence rather than going back ( which is impossible), I give them the option to close the tab automatically instead. You can try it out for yourself in my microgesture extension if you use an old copy of FF that still has the gBrowser interface. It works very well. There is a less obvious use for canGoForward along the same lines.
Severity: normal → enhancement
Whiteboard: design-decision-needed → [design-decision-needed]
Hi snuz.gary, this has been added to the agenda for the WebExtensions APIs triage on April 10, 2018. Would you be able to join us? Here’s a quick overview of what to expect at the triage: * We normally spend 5 minutes per bug * The more information in the bug, the better * The goal of the triage is to give a general thumbs up or thumbs down on a proposal; we won't be going deep into implementation details Relevant Links: * Wiki for the meeting: https://wiki.mozilla.org/WebExtensions/Triage#Next_Meeting * Meeting agenda: https://docs.google.com/document/d/1cFcqNOLwp77aosh5QUeNKgW8FQONAzOBlqjbcbxdIXw/edit# * Vision doc for WebExtensions: https://wiki.mozilla.org/WebExtensions/Vision
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
Hi snuz.gary -- Kris marked this as a duplicate of another proposed API, which has been approved and is currently under development. :) Following bug 1378651 is probably the best way to track progress.
Whiteboard: [design-decision-needed]
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.