On 29 Mai, 13:02, Aaron Boodman <[email protected]> wrote:
> On Thu, May 28, 2009 at 11:57 PM, Patrick Stenzel
>
> <[email protected]> wrote:
> > 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.

I think it had to do with pages containing iframes.
I did some redesign and the problem did not appear anymore, so it was
probably my coding.
If i stumble upon it again, i`ll give you a notice.

> > 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.

Well, in my special case it helped when i found out that the port-
class delivers a tab object (which should be mentioned here
http://dev.chromium.org/developers/design-documents/extensions/content-scripts).
This gave me the ability to evaluate if the sending and the current
tab are the same.
I haven`t found out yet how to call a content script in another tab
than the selected. If that works i`m fine with it, because i
understand why you did that, even though i still think something like
the above example would be more intuitive.

> > 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/conten...

I think i simply read this option over and give it a try. ;-)

> > 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.
>
> The idea is that you'll be able to use HTML5 LocalStorage API for
> this, but it isn't implemented yet.

This is consistent. I totally agree with you and promise to be
patiently waiting for this.
And for drop-downs! ;-)
Regarding the Authentication: I understood that extensions don`t have
any direct touch points with the contentWindow. So when i tried to
make an XHR-request to a server that requires authentication it
probably won`t work, but it should work in a content script until
Cross-Origin XHR restrictions will take effect.
This is a problem, because in that nagios testcase i want the user to
be able to enter his server-url and login information, so i cant put
it in the manifest and a background-process that needs to open the
page first is at least suboptimal. ;-)

BTW. You guys do a great job on chromium.
--~--~---------~--~----~------------~-------~--~----~
Chromium Discussion mailing list: [email protected] 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-discuss
-~----------~----~----~----~------~----~------~--~---

Reply via email to