You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by Justin Wyllie <ju...@hotmail.co.uk> on 2010/12/15 18:38:28 UTC

callback with requestSendMessage

Hi
In the spec it says: requestSendMessage(recipients, message, opt_callback, opt_params)
Is the callback supposed to be defined in the gadget or the container ? I would assume the idea is the gadget writer can define their own callback function.

Are you supposed to pass a variable representing a function which you have defined in the gadget and this will be executed in the container? 

In my tests that only works when the gadget and container are on the same domain. If on different domains nothing is passed and there is no callback.

Is this expected?

Thanks
Justin Wyllie 		 	   		  

Re: callback with requestSendMessage

Posted by John Hjelmstad <fa...@google.com>.
AFAIK callback should be a function defined in the context of the caller,
ie. gadget.

On Wed, Dec 15, 2010 at 9:38 AM, Justin Wyllie
<ju...@hotmail.co.uk>wrote:

>
> Hi
> In the spec it says: requestSendMessage(recipients, message, opt_callback,
> opt_params)
> Is the callback supposed to be defined in the gadget or the container ? I
> would assume the idea is the gadget writer can define their own callback
> function.
>
> Are you supposed to pass a variable representing a function which you have
> defined in the gadget and this will be executed in the container?
>
> In my tests that only works when the gadget and container are on the same
> domain. If on different domains nothing is passed and there is no callback.
>
> Is this expected?
>
> Thanks
> Justin Wyllie