Yes, "window.focus()" does not work, I guess intentionally. Probably due to
bad user experience, like there is no resize blocking option for popups.

☆PhistucK


On Sat, Jan 9, 2010 at 23:45, Brett Slatkin <bslat...@gmail.com> wrote:

> So if I add permissions for every domain, this error goes away and the
> executeScript works perfectly (my callback is called). But window.focus
> () still doesn't work, presumably because Chrome is blocking the pop-
> up-like behavior of my extension.
>
> What I'd really like is for the 'updateInfo' parameter of the
> chrome.windows.update function to take a 'selected' field; then I'd be
> done without all this hackery.
>
> Are there any other restrictions like pop-ups that Chrome enforces on
> normal pages? Maybe there could be a permission for extensions to
> relax these?
>
> On Jan 9, 1:31 pm, Brett Slatkin <bslat...@gmail.com> wrote:
> > The permissions error I get for executeScript is:
> >
> > Error during tabs.executeScript: Cannot access contents of url "
> http://www.google.com/";. Extension manifest must request permission to
> access
> > this host.
> >
> > So I guess I need to put "http://*/*"; in my permissions list?
> >
> > On Jan 9, 1:16 pm, Brett Slatkin <bslat...@gmail.com> wrote:
> >
> >
> >
> > > I'm having this same issue. I can't manage to cause a window to focus.
> > > Using executeScript with that causes a security error, even though my
> > > manifest says :
> >
> > > "matches": ["http://*/*";, "https://*/*";, "file:///*", "ftp://*/*";],
> >
> > > Now I'm sending a message to a specific tab with
> > > chrome.tabs.sendRequest and this results in an untraceable error,
> > > covered by this issue:
> >
> > >http://code.google.com/p/chromium/issues/detail?id=21735
> >
> > > TypeError
> > > arguments: Array
> > > message: "Cannot read property 'focus' of undefined"
> > > stack: "TypeError: Cannot read property 'focus' of undefined at
> > > chrome-
> > > extension://iiblabjehfmonfbnnkmbh…"
> > > type: "non_object_property_load"
> >
> > > I'll see if I can isolate it more.
> >
> > > On Jan 6, 7:51 pm, Evan <evan.j...@gmail.com> wrote:
> >
> > > > Thanks for the tip Aaron but the behavior is the same, using
> > > > console.log() I can see that the window.focus() is executing in the
> > > > tab but the window does not change.
> >
> > > > ... any other tips out there, I really am stumped on this one :|
> >
> > > > Evan
>
> --
> You received this message because you are subscribed to the Google Groups
> "Chromium-extensions" group.
> To post to this group, send email to chromium-extensi...@googlegroups.com.
> To unsubscribe from this group, send email to
> chromium-extensions+unsubscr...@googlegroups.com<chromium-extensions%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/chromium-extensions?hl=en.
>
>
>
>
--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To post to this group, send email to chromium-extensi...@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