in the content script you could setup a sort of private connection to the background script with chrome.runtime.connect and have to report location.href, document.documentElement.clientWidth and document.documentElement.clientHeight.
then in the background you setup the other end of the private channel with a chrome.runtime.onConnect.addListener and catch the messaging.
when you catch the message you loop through the tabs with chrome.tabs.query and send every tab the data using chrome.tabs.connect
the broadcasted message can be caught with a chrome.runtime.onConnect.addListener in the content script
enjoy
Op donderdag 23 april 2015 13:54:31 UTC+2 schreef shabeena nawaz: