Thank you for the quick answer.
Here is my command:
CmdUtils.CreateCommand({
names: ["todoso"],
arguments: [{role: 'object', nountype: noun_arb_text}],
execute: function execute(args) {
Utils.log(Utils.tabs.get("ToDoSo"))
Utils.log(Utils.tabs.get("ToDoSo").window)
CmdUtils.getWindow().postMessage("yo", "*");
}
});
The first log returns an object which might be a fuelBrowserTab
but the second log returns undefined
and the last line doesn't do anything although executing
window.postMessage("ola", "*") in Firebug has the desired effect : (
I'll try with a clean Firefox profile and and a new install of
Ubiquity.
On Sep 24, 10:55 pm, satyr <[email protected]> wrote:
> 2009/9/25 Louis-Rémi Babé <[email protected]>:
>
> > out of focus. I can do Utils.tabs.get('myTab') but the object returned
> > is strange. I see a "get window" property in firebug but I cannot
> > access it (getWindow() or ["get window"]() fail)
>
> The tab objects returned by Utils.tabs.get()
> are:https://developer.mozilla.org/en/Toolkit_API/FUEL/fuelIBrowserTab
>
> > - If I use Utils.focusUrlInBrowser to give the focus to this tab and
> > then CmdUtils.getWindow, postMessage doesn't seem to have any effect.
>
> Tested myself, and this seemed to work:
>
> function cmd_post_message_test(){
> CmdUtils.getWindow().postMessage("yo", "*");
> }
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---