I found a tricky solution: I store the data in the localStorage of the
page and set the eventListener on the storage event:
Utils.tabs.get("ToDoSo")
[0].document.defaultView.window.localStorage.temp = Utils.encodeJson
(args.object);
window.addEventListener("storage", function( event ) {
var data = localStorage.temp.slice(0);
delete localStorage.temp;
console.log( JSON.parse(data) );
}, false);
I still hope there is a better solution.
Regards,
Louis-Rémi Babé
On Sep 26, 1:56 pm, Louis-Rémi Babé <[email protected]> wrote:
> Well,
>
> what you've indicated actually works, but when I try
> Utils.tabs.get("ToDoSo")[0].window.postMessage("bar", "*")
> It returns "postMessage is not a function"
> and
> Utils.tabs.get("ToDoSo")[0].document.defaultView.window.postMessage
> ("foo", "*")
> has no effect
>
> I still cannot pass data to a tab that doesn't have focus...
>
> On Sep 25, 12:21 am, satyr <[email protected]> wrote:
>
> > > but the second log returns undefined
>
> > tabs.get() returns array. So:
>
> > Utils.log(Utils.tabs.get("ToDoSo")[0].window);
>
> > > and the last line doesn't do anything although executing
> > > window.postMessage("ola", "*") in Firebug has the desired effect
>
> > How about this one?:
>
> > function cmd_post_message_test2(){
> > CmdUtils.getWindowInsecure().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
-~----------~----~----~----~------~----~------~--~---