As suggested by Ciavash:
As I see it, this is so that developers could programatically react to the content type of a tab.
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: https://addons.mozilla.org/en-US/firefox/addon/imgviewerplus/
Created attachment 643967 [details]
Pointer to Github pull request: https://github.com/mozilla/addon-sdk/pull/502
Pointer to Github pull-request
This will work correctly on mobile, yes?
`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?
Commits pushed to master at https://github.com/mozilla/addon-sdk
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