You don't have access to the window object (you are on a little sandbox) so
you have to access it through CmdUtils.getWindow().

On Mon, Jan 19, 2009 at 2:28 PM, Aurimas <[email protected]> wrote:

>
> This simple function should display an alert on Firefox startup:
> function startup_test1() {
>  window.alert(1);
> }
>
> But it throws an error: "The global window object is deprecated in
> command feeds. Please use context.chromeWindow instead."
> So I've changed window to context.chromeWindow:
> function startup_test2() {
>  context.chromeWindow.alert(2);
> }
>
> But it throws another error: "Error: context is not defined".
> Though it seems to work if I make it as a command by changing startup_
> in the function name to cmd_.
>
> So, how can I access chrome window on browser startup?
> >
>


-- 
Fernando "Takai"
http://flickr.com/photos/supeertakai
http://fernandotakai.jaiku.com

Get Ubiquity: https://ubiquity.mozilla.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ubiquity-firefox" 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/ubiquity-firefox?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to