PhistucK is right on everything except one detail:

You can get the window object of the current tab by using
chrome.tabs.executeScript(). See:

http://code.google.com/chrome/extensions/tabs.html#method-executeScript

But again, note that toolstrips are dead. Long live browser actions.

- a

On Sun, Nov 1, 2009 at 8:50 AM, PhistucK <phist...@gmail.com> wrote:
> You cannot get to the window object, especially not with toolstrips. Every
> script (content scripts and page scripts) lives in its own world, so they
> cannot touch the window\global objects (as far as I understand), but only
> manipulate the DOM.
> Toolstrips are deprecated, you are advised to use Browser Actions instead
> (documentation).
> Note that the Browser Actions API is not so polished yet. The link I
> specified to the documentation is up to date with the trunk version (not the
> Dev\Beta\Stable version).
> The most official documentation is in here, but it does not include Browser
> Actions yet, since the Dev version has been postponed for a bit. Once the
> new version is out, the documentation will be updated, as well.
> ☆PhistucK
>
>
> On Sun, Nov 1, 2009 at 08:50, Phil <constanti...@gmail.com> wrote:
>>
>> Hey -
>> What's the best way to get a reference to the current tab's DOM Window
>> object (not the Chrome Window object) from the Toolstrip.
>>
>> I'm trying to write a toolstrip extension that modifies and gets the
>> properties ofthe current Window's DOM but the "window" variable seems
>> to be set to the toolstrip itself and not the current web page.
>>
>> Thanks in advance.
>>
>>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Chromium-extensions" group.
To post to this group, send email to chromium-extensions@googlegroups.com
To unsubscribe from this group, send email to 
chromium-extensions+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/chromium-extensions?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to