On Thu, May 28, 2009 at 11:57 PM, Patrick Stenzel
<[email protected]> wrote:
> 1. Using content scripts, eventhandlers seem to be a little unreliable
> For the show-the-image-extension i used the "subscribe"-example, where
> the find-function is called when the script is intialized and onfocus.
> Assuming "onfocus" is on focus of the tab, which sometimes works, but
> sometimes not.

> 3. The ability of sending messages between extension and conten
> scripts does not work as i expected but i haven`t figured out yet if
> this is an issues in the extension or the extension system itself. In
> my case i think it would be better to trigger the scan for images or
> image links on demand than onload or onfocus but it doesn`t work
> properly, especially if you have more than one open tab.

If you can give us a reproducible test case for this, it's definitely
something we'll fix.

> 2. I think it should be easier to manipulate the DOM from within an
> extension.
> Instead of the use of a content script to access the contentwindow it
> would be more intuitive to be able to use something like
> chrome.tabs.getSelected(windowID,function(tab) {
>    tab.document.getElementByTagName('whatever');
> })
> directly out of the extension itself.

Yes, we'd like to enable this. It's tricky because extensions run in a
different process from the web page, but some subset of the DOM may be
possible to implement. We'll keep it in mind.

> 4. I`m missing the possibility to manipulate the DOM before everything
> is loaded. Maybe you wanna make an adblock-extension, you can prevent
> ads from displaying but it would be better to not even load e.g. to
> save bandwidth.

You can use the "run_at": "document_start" key in your content script
registration (in the manifest) to inject your script before any HTML
has been parsed. You can also use CSS. Check out:
http://dev.chromium.org/developers/design-documents/extensions/content-scripts

> 5. I even more miss the ability to save things on the clientside and
> to use base authentication in XHR requests, which seems to not work
> correctly. I started to make an extension which keeps an eye on my
> nagios-monitored systems.
> I made an xml file to store the connection-information which i can
> read from my extension but i can`t change it from within a gui or
> something. So i can check the status if i login once in a session
> manually, like in the gmail-check example, can connect to the host,
> defined in the preferences.xml, but i dont have the ability to store
> this information and log-in automatically from within the extension.
> Maybe someone has an idea how to do this.

The idea is that you'll be able to use HTML5 LocalStorage API for
this, but it isn't implemented yet.

- a

--~--~---------~--~----~------------~-------~--~----~
Chromium Discussion mailing list: [email protected] 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-discuss
-~----------~----~----~----~------~----~------~--~---

Reply via email to