Allow WebExtensions to directly update the tab title.

RESOLVED WONTFIX

Status

()

Toolkit
WebExtensions: Untriaged
RESOLVED WONTFIX
7 months ago
5 months ago

People

(Reporter: Alexander O'Mara, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [design-decision-denied][tabs]triaged)

(Reporter)

Description

7 months ago
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:51.0) Gecko/20100101 Firefox/51.0
Build ID: 20170118123726

Steps to reproduce:

It would be helpful for many different purposes if a WebExtension could change the browser tab title, without needing to modify the DOM to do it.

This is possible and very easy to do in a SDK-based add-on.

    var tabs = require('sdk/tabs');
    tabs.on('ready', function(tab) {
        tab.title = 'testing123';
    });

However, since the move is towards WebExtensions, that's likely not a good option going forward.

It would be helpful if similar WebExtension code like this were possible:

    chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) {
        chrome.tabs.update(tabId, { title: 'testing123' }, function(tab) { console.log(tab); });
    });

However, there is no support for changing title in this way, so it produces this error:

> Type error for parameter updateProperties (Unexpected property "title") for tabs.update.

The only work-around we have would be to modify the DOM, by setting `document.title` in a content script. This is sub-optimal for several reasons, including changing DOM properties that may need expected values, and the privacy issue of browser fingerprinting.

I propose that it be made possible to modify the title, in much the same way it is already possible with SDK-based add-ons.

Updated

7 months ago
Whiteboard: [design-decision-needed][tabs]

Comment 1

6 months ago
Whilst the SDK had an API for this, it doesn't mean we should add this to WebExtensions. You can update the tab title by changing the DOM as you've noted. But we couldn't understand the issue of why changing the tab title rather than through the document would lead to fingerprinting. Could you expand on that?

At this point we can't figure out a need for this API.
Whiteboard: [design-decision-needed][tabs] → [design-decision-denied][tabs]
(Reporter)

Comment 2

6 months ago
Suppose you were to create an extension that modified the title on all pages, perhaps to add information to the title to assist password manager software detecting the page you are on.

This little bit of extra data being added to the title would be one more data point that could be used to help uniquely identify a user's browsers. Those that have such an extension installed, and those that don't.

Comment 3

6 months ago
If you wanted to store extra data on the tab, something like bug 1322060 seems like a better way to go.
(Reporter)

Comment 4

6 months ago
Can that be used to change the title that the OS sees?

That's basically what is needed to get the auto type to recognize which window is active.

Updated

6 months ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 6 months ago
Resolution: --- → WONTFIX
Whiteboard: [design-decision-denied][tabs] → [design-decision-denied][tabs]triaged

Updated

6 months ago
Duplicate of this bug: 1340633
You need to log in before you can comment on or make changes to this bug.