Closed Bug 795645 Opened 12 years ago Closed 12 years ago

the Tab object should have a unique id

Categories

(Add-on SDK Graveyard :: General, defect, P2)

x86
macOS
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: canuckistani, Unassigned)

References

(Depends on 1 open bug)

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
I've updated https://github.com/mozilla/addon-sdk/pull/595 to include some basic tests.
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
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.14
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.