Open Bug 1385596 Opened 5 years ago Updated 4 years ago

Webextensions APIs lacking adding things to location bar


(WebExtensions :: General, defect, P5)

55 Branch


(Not tracked)



(Reporter: mozilla.bugzilla, Unassigned)



(Whiteboard: [design-decision-deferred])


(1 file)

13.53 KB, application/x-xpinstall
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:55.0) Gecko/20100101 Firefox/55.0
Build ID: 20170727114834

Steps to reproduce:

Wrote most of a webextension version of the link-location-bar extension (old-style version attached)
Got to the point where I'd like to display the location of the hovered link in the location bar

Actual results:

The webextension API is missing the ability to add text to the location bar on the non-url side (right for l2r langs and left presumably for r2l langs), or arbitrary width icons/svgs

Expected results:

There should be a way to add arbitrary text to the location bar in an unobtrusive way, to provide information that is relevant to the page. This could either be by allowing arbitrary width svgs or just text directly.

It would also be nice to be able to highlight parts of the text in a lighter/darker color to make the domain of the url stand out, much like the location bar does for the current page.
Component: Untriaged → WebExtensions: General
Product: Firefox → Toolkit
Closed: 5 years ago
Resolution: --- → DUPLICATE
Resolution: DUPLICATE → ---
Summary: Webextensions APIs lacking → Webextensions APIs lacking adding things to location bar
Priority: -- → P5
Whiteboard: [design-decision-needed]
Hi Cam, this has been added to the agenda for the August 22 WebExtensions APIs triage meeting. Would you be able to join us? 


I believe I can join, as long as it doesn't run late. I've got another appointment shortly afterwards.
Flags: needinfo?(amckay)
Currently there isn't any API in the location bar to do this and we'd have to get the team who look after the location bar to provide one. The location bar is a complicated area and inserting text into the location bar would probably require quite a lot of work and support on our end.

I'm assuming that the answer is no, but I'm pinging :past who might know someone.
Flags: needinfo?(amckay) → needinfo?(past)
Whiteboard: [design-decision-needed] → [design-decision-deferred]
Andy is right, this is going to be hard to get right, especially with the critically important security role of the location bar. We have been unable to make much progress on a much more narrow issue in displaying additional text in the location bar (bug 1235397), so I am not very optimistic.

If someone could fix that bug, it might provide us with a path forward here.
Flags: needinfo?(past)
But it works fine now, so there is a perfectly good implementation of a location bar that allows for the forward/back refresh/stop buttons as well as link text to all appear in the location bar. I understand that redoing the location bar is probably hard but if it can't be made to be at least as functional as the current one, then replacing it shouldn't even be considered.
Anyway in the meantime I tried to create a "webextensions API experiment" looking at the docs at but there's nothing there about getting a handle on the browser chrome, so I gave up on that.
Product: Toolkit → WebExtensions
Duplicate of this bug: 1506332
You need to log in before you can comment on or make changes to this bug.