Question

chrome.tabs.sendMessage(integer tabId, any message, function responseCallback)

In this what is the purpose of tab id? Is that required when I port to Firefox?

Was it helpful?

Solution

With chrome.tabs.sendMessage you can send some information to a content script. And with tabId you specifiy the tab you want so send the message to.

See http://developer.chrome.com/extensions/tabs.html#method-sendMessage for more info for chrome.

I don't know about Firefox though. Maybe this question helps: how to implement Chrome extension 's chrome.tabs.sendMessage API in Firefox addon

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top