I believe that this is due to a bug which I've just checked in a fix for.
The issue was that we would sometimes GC content scripts if they didn't mak
a reference from the document to the content script. You can test if this is
the problem by doing something like:

function dummy() { }
window.addEventListener("load", dummy, false);

If this makes it work, it is probably the bug I'm talking about, and it will
be fixed in the next dev channel release.

- a

On Wed, Oct 7, 2009 at 7:05 PM, Kevin Jin <[email protected]> wrote:

>
> I have a content script which opens a port to the extension. It works
> fine on pages w/o frames, but for any page that contains frames, such
> as this simple one:
> top.html:
>  <iframe src="frame1.html"></iframe>
> frame1.html:
> <h1>frame1</h1>
> <script>
> if (window == top) {
>  document.write('<h2>window == top</h2>');
> }
> </script>
>
> The port is disconnected unexpectedly -- my extension receives
> port.onDisconnect once top.html is loaded.
> I do use the window == top test in my content script so that it
> creates port only for top, not frame1.
>
> >
>

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

Reply via email to