Implement chrome.webNavigation.onTabReplaced

VERIFIED FIXED in Firefox 52

Status

()

Toolkit
WebExtensions: Compatibility
P2
normal
VERIFIED FIXED
11 months ago
8 months ago

People

(Reporter: mattw, Assigned: bsilverberg)

Tracking

(Blocks: 1 bug)

unspecified
mozilla52
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox52 verified)

Details

(Whiteboard: [webNavigation] triaged)

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Reporter)

Description

11 months ago
AddBlock, which is a top addon in the Chrome Webstore, uses this method. Currently, when running this addon as a WebExtension, it throws the following error: `TypeError: chrome.webNavigation.onTabReplaced is undefined`.
This just needs a stub listener.
(Assignee)

Comment 2

11 months ago
AdBlock uses this listener to remove data for the replaced tab. Do we not have the concept of a replaced tab in Firefox, and is that why you are suggesting implementing this with just a stub?
Flags: needinfo?(kmaglione+bmo)
No, we don't have anything equivalent to this.
Flags: needinfo?(kmaglione+bmo)
(Assignee)

Updated

11 months ago
Blocks: 1281815
(Assignee)

Updated

11 months ago
Blocks: 1281816
(Assignee)

Updated

11 months ago
No longer blocks: 1281816

Updated

11 months ago
Priority: -- → P2
Whiteboard: [webNavigation] triaged

Comment 4

11 months ago
:bsilverberg it seems that this bugzilla issue is about adding the webNavigation version of what we are already doing for tabs.onReplaced:

     ...
     onReplaced: ignoreEvent(context, "tabs.onReplaced"),
     ...

From: https://dxr.mozilla.org/mozilla-central/source/browser/components/extensions/ext-tabs.js#335

`ignoreEvent` is a small helper that we can import from ExtensionUtils.jsm (https://dxr.mozilla.org/mozilla-central/source/toolkit/components/extensions/ExtensionUtils.jsm#738), it creates an error message which warns that the specified API event has not been implemented, but it doesn't block the caller from going on with the rest of its execution.

(the error is reported in the Browser Console, it is associated with the called window context and to the fileName / lineNumber of the caller, which is helpful to point out to the developer where the addon is trying to use the ignored/unsupported API event)
(Assignee)

Comment 5

11 months ago
Thanks Luca, that's perfect!
(Assignee)

Updated

11 months ago
Assignee: nobody → bob.silverberg
Status: NEW → ASSIGNED
(Assignee)

Updated

8 months ago
Iteration: --- → 51.3 - Sep 19
Component: WebExtensions: Untriaged → WebExtensions: Compatibility
Comment hidden (mozreview-request)

Comment 7

8 months ago
mozreview-review
Comment on attachment 8791362 [details]
Bug 1280404 - Implement chrome.webNavigation.onTabReplaced,

https://reviewboard.mozilla.org/r/78788/#review77410
Attachment #8791362 - Flags: review?(aswan) → review+
(Assignee)

Comment 8

8 months ago
Try looks good, requesting check in.
Keywords: checkin-needed

Comment 9

8 months ago
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/bd305c9791cb
Implement chrome.webNavigation.onTabReplaced, r=aswan
Keywords: checkin-needed

Comment 10

8 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/bd305c9791cb
Status: ASSIGNED → RESOLVED
Last Resolved: 8 months ago
status-firefox52: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla52

Comment 11

8 months ago
I could see this error message on Firefox 51.0a1 (20160918030408)

This issue is verified as fixed on Firefox 52.0a1 (2016-09-21), the error message: `TypeError: chrome.webNavigation.onTabReplaced is undefined` is no longer thrown in the browser console.
Status: RESOLVED → VERIFIED
status-firefox52: fixed → verified
You need to log in before you can comment on or make changes to this bug.