Last Comment Bug 775606 - ENH add a 'tab.contentType' property to the tab object
: ENH add a 'tab.contentType' property to the tab object
Product: Add-on SDK
Classification: Client Software
Component: General (show other bugs)
: unspecified
: x86 Mac OS X
P3 normal (vote)
: ---
Assigned To: Matteo Ferretti [:zer0] [:matteo]
Depends on:
  Show dependency treegraph
Reported: 2012-07-19 09:31 PDT by Jeff Griffiths (:canuckistani) (:⚡︎)
Modified: 2012-09-18 23:53 PDT (History)
4 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---

Pointer to Github pull request: (355 bytes, text/html)
2012-07-19 12:24 PDT, Matteo Ferretti [:zer0] [:matteo]
rFobic: review+

Description User image Jeff Griffiths (:canuckistani) (:⚡︎) 2012-07-19 09:31:29 PDT
As suggested by Ciavash:

As I see it, this is so that developers could programatically react to the content type of a tab.
Comment 1 User image Siavash 2012-07-19 12:07:07 PDT
It can be useful when you want to do something based on type of the content. If you want to add something to the image viewer for example, you need to know that the content is an image, then do something with it.

In my add-on, I had to look for "resource://gre/res/TopLevelImageDocument.css" in the link tag to find out that an image is being displayed.
My add-on:
Comment 2 User image Matteo Ferretti [:zer0] [:matteo] 2012-07-19 12:24:04 PDT
Created attachment 643967 [details]
Pointer to Github pull request:

Pointer to Github pull-request
Comment 3 User image Wes Kocher (:KWierso) 2012-07-19 14:59:27 PDT
This will work correctly on mobile, yes?
Comment 4 User image Matteo Ferretti [:zer0] [:matteo] 2012-07-19 15:04:52 PDT
`tabs` module doesn't work on mobile at all, so I'm not sure I got the question. Mobile should supports the `document.contentType`, so as soon as the `tabs` module will works on Mobile, that properties will be work as well (along `url` and `title` properties).

if I misunderstood the question, could you be more explicit?
Comment 5 User image [github robot] 2012-07-30 10:24:18 PDT
Commits pushed to master at
Bug 775606 - ENH add a 'tab.contentType' property to the tab object

Added `tab.contentType` to tabs API, updated test and docs
Merge remote-tracking branch 'upstream/master' into tab.contentType/Bug775606

Merge pull request #502 from ZER0/tab.contentType/Bug775606

fix Bug 775606 - ENH add a 'tab.contentType' property to the tab object r=@gozala

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