the Tab object should have a unique id

RESOLVED FIXED in 1.14

Status

Add-on SDK
General
P2
normal
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: canuckistani, Unassigned)

Tracking

(Depends on: 1 bug, Blocks: 1 bug)

unspecified
1.14
x86
Mac OS X
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Both desktop & Fennec implement a unique id per tab, exposing this via the Tab class in the high-level tabs module would be a win:

* some uses cases could be simplified if a specific tab can be uniquely identified

    http://stackoverflow.com/questions/4997818/firefox-get-unique-id-of-tabs-for-extension-development
    http://stackoverflow.com/questions/12495258/identify-drag-of-tab-into-new-different-window
    http://stackoverflow.com/questions/8098580/identify-tab-that-made-request-in-firefox-addon-sdk

* chrome has it:

http://developer.chrome.com/extensions/tabs.html#type-Tab
Pull request https://github.com/mozilla/addon-sdk/pull/595

Updated

5 years ago
Priority: -- → P2
Depends on: 815804
Blocks: 821779
I've updated https://github.com/mozilla/addon-sdk/pull/595 to include some basic tests.

Updated

5 years ago
Blocks: 686035

Comment 3

5 years ago
Commits pushed to master at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/ae0d05098d41be741aca9d64bd0fe6522857a4c5
bug 795645: expose unique tab ids to the high-level tabs module, now including minimal tests.

https://github.com/mozilla/addon-sdk/commit/db4f6688accc1d84b1435a27cf99cde7c1aa93cc
Merge pull request #595 from canuckistani/bug_795645

Fix Bug 795645 expose unique tab ids to the high-level tabs module r=@erikvold

Updated

5 years ago
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.14

Comment 4

5 years ago
I test the commit but there a problem: After move the tab to other browser window, the id not the same.

The Chrome document say: The ID of the tab. Tab IDs are unique within a browser session. 

I think it's better to keep it same in the same session like Chrome, not only in a window.
You need to log in before you can comment on or make changes to this bug.