chrome.tabs.highlight needs clearer documentation
Reported by
vitaly.z...@gmail.com,
Jul 10 2017
|
||||||
Issue description
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36
Steps to reproduce the problem:
1. Write on js console of the extension `chrome.tabs.highlight({'tabs': 0})`
What is the expected behavior?
Some highlight of the first tab.
What went wrong?
Nothing happened - no error and no highlight. Also in documentation https://developer.chrome.com/extensions/tabs#method-highlight expected to see apng with highlighting in action.
Did this work before? N/A
Does this work in other browsers? N/A
Chrome version: 59.0.3071.115 Channel: stable
OS Version: OS X 10.12.5
Flash Version:
,
Jul 10 2017
Ok, thank you for the answer - so no way to visually highlight some tab?
,
Jul 10 2017
There's no API to animate a tab. To draw the user's attention you can change the favicon of the page. Even animate the favicon via canvas. Or change the document.title by prefixing it with some symbols in a setInterval loop. For example prepend with a dot •, pause for 1000ms, change it to a space. In the '80s text based UI imitated "busy" state spinners by displaying / — \ | symbols in one position sequentially.
,
Jul 11 2017
[mac bug triage] Just updating this bug with more information to get it out of our triage queue :)
,
Jul 11 2017
@woxxom, thank you for your thoughts about animation! I have no questions anymore, hope that you will update documentation (or/and rename `highlight` to maybe `switch`) for future visitors.
,
Jul 14 2017
Could some one from documentation review it. Untriaged it so that it gets addressed. Thanks.!
,
Jul 14 2017
We probably won't change the name of the method, since that would break existing extensions. But we can change the documentation to be a bit more clear.
,
Feb 8 2018
,
Mar 5 2018
documentation -> crystallambert@
,
Mar 5 2018
-> crystallambert@ for realz.
,
Mar 16 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/70df9cff39903a4add892695dc098bb14688449d commit 70df9cff39903a4add892695dc098bb14688449d Author: CrystalFaith <crystallambert@chromium.org> Date: Fri Mar 16 20:47:24 2018 [Extension API Docs]Update tabs.highlight language Updated description for clarity. Bug: 740432 Change-Id: Ic7c8c7f96738d77c7b188e0b08d637f97b7bc31f Reviewed-on: https://chromium-review.googlesource.com/957864 Reviewed-by: Devlin <rdevlin.cronin@chromium.org> Commit-Queue: Crystal Lambert <crystallambert@chromium.org> Cr-Commit-Position: refs/heads/master@{#543817} [modify] https://crrev.com/70df9cff39903a4add892695dc098bb14688449d/chrome/common/extensions/api/tabs.json |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by woxxom@gmail.com
, Jul 10 2017The documentation and the method name are indeed a bit misleading. Highlighting isn't an animation. It's the functionality of Ctrl-click on tab title in the tab strip to select multiple tabs. Ctrl-clicking on not yet selected tab selects and focuses it. Anyway, chrome.tabs.highlight({tabs: 0}) is working as expected: it sets the tab selection to just one tab (the first one in the window), which means that this tab gets focused or nothing happens if it was already focused.