Sounds nice and simple. One other use case I can think of is executing a content script on every page load, but only if a user setting is on (or some other set of conditions). I haven't used the chrome.tabs API much yet, does the onUpdated event get triggered on each page load? If so, then an onUpdated event plus executeContentScript should be all we need to implement that.
Concerning the following:
// tabId: Optional, defaults to selected tab of focused window if
omitted.
Maybe it would be better to use current window instead of focused? The
caller is extension script and it may have some state variables or
something which belongs to current window while extension script in
focused window may have different state.
Denis
On Jul 16, 12:26 am, Aaron Boodman <a...@chromium.org> wrote:
On Thu, Jul 16, 2009 at 2:44 AM, disya2 <dis...@gmail.com> wrote:
> Concerning the following:
> // tabId: Optional, defaults to selected tab of focused window if
> omitted.
> Maybe it would be better to use current window instead of focused? The
> caller is extension script and it may have some state variables or
> something which belongs to current window while extension script in
> focused window may have different state.
The problem with that is that background pages don't have a "current window"
the way that toolstrips do.