Last Comment Bug 795645 - the Tab object should have a unique id
: the Tab object should have a unique id
Status: RESOLVED FIXED
:
Product: Add-on SDK
Classification: Client Software
Component: General (show other bugs)
: unspecified
: x86 Mac OS X
: P2 normal (vote)
: 1.14
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on: 815804
Blocks: sdk/tabs 686035
  Show dependency treegraph
 
Reported: 2012-09-29 15:38 PDT by Jeff Griffiths (:canuckistani) (:⚡︎)
Modified: 2013-02-17 23:10 PST (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments

Description Jeff Griffiths (:canuckistani) (:⚡︎) 2012-09-29 15:38:46 PDT
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
Comment 1 Jeff Griffiths (:canuckistani) (:⚡︎) 2012-09-29 15:48:08 PDT
Pull request https://github.com/mozilla/addon-sdk/pull/595
Comment 2 Jeff Griffiths (:canuckistani) (:⚡︎) 2012-12-27 13:24:22 PST
I've updated https://github.com/mozilla/addon-sdk/pull/595 to include some basic tests.
Comment 3 [github robot] 2012-12-28 00:45:40 PST
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
Comment 4 muzuiget 2013-02-17 23:10:17 PST
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.

Note You need to log in before you can comment on or make changes to this bug.