cool, thanks for the update. Looking at browser actions, is there a recommendation for how to get access to the DOM of the current tab's DOM (again preferably the DOM window object). My goal is to take the HTML on the page (either the selection or the whole window) and write it into the popup with some minor text transformations.
As you mentioned, I can run a script on the page but can't seem to figure out how to return data to my extension if there's no shared memory. It looks like Page Action's have part of what I want (the examples show it getting access "document" but I'm not sure how to get all this things to play together.) Any suggestions would be great. Also, am I correct that there's no entry for the Browser action popup in "Active views"? This makes it a little hard to open up the debugger for this stuff. I appreciate the help. On Nov 1, 10:33 am, Aaron Boodman <[email protected]> wrote: > 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 <[email protected]> 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 <[email protected]> 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/chromium-extensions?hl=en -~----------~----~----~----~------~----~------~--~---
