Message events

1 view
Skip to first unread message

john

unread,
Nov 21, 2009, 11:03:29 PM11/21/09
to mozilla-labs-jetpack
Is it possible to send message events between a Jetpack script and the
web page? I have tried the window.postMessage() method as shown below.
The onClick function executes without error, however, the web page
never receives any message events. Can anyone confirm that message
events are permitted, and point out how to do it, and maybe post an
example too?

jetpack.future.import("slideBar");
jetpack.slideBar.append( {
onClick: function(slide) {
var win = jetpack.tabs.focused.contentWindow;
win.top.postMessage("message1","example.com");
win.top.postMessage("message2","*");
console.log("Sent test messages");
}
});

john

unread,
Nov 25, 2009, 9:13:19 AM11/25/09
to mozilla-labs-jetpack
Jeepers, a simple question about message events and *nobody* can help?
I guess I'll have to stick with Greasemonkey....

Hernan Rodriguez Colmeiro

unread,
Nov 25, 2009, 9:42:22 AM11/25/09
to mozilla-la...@googlegroups.com
On Wed, Nov 25, 2009 at 11:13, john <john....@gmail.com> wrote:
> Jeepers, a simple question about message events and *nobody* can help?
> I guess I'll have to stick with Greasemonkey....
>

Calm down John, if anybody can help you'll get a response. Saying
harsh things won't help getting your question answered...

Hernán

Morgan Allen

unread,
Nov 25, 2009, 9:56:36 AM11/25/09
to mozilla-la...@googlegroups.com
You put it so much nicer then I almost did....

John, I hacked at it a bit and could not get it to work either. Had planned on hacking on it more as this is a feature I would like too, but haven't had time. Maybe file a bug report.


--

You received this message because you are subscribed to the Google Groups "mozilla-labs-jetpack" group.
To post to this group, send email to mozilla-la...@googlegroups.com.
To unsubscribe from this group, send email to mozilla-labs-jet...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mozilla-labs-jetpack?hl=en.





--
http://morglog.org
.......It's a sweater!


http://www.alleycatracing.com
LTABOTIIOFR! ROFL! ROFL! ROFL!
Upcoming alley cats, reviews, touring logs, and a general congregation of bike nerdity.
Reply all
Reply to author
Forward
0 new messages