You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by Robert Peterson <ju...@gmail.com> on 2010/03/02 03:25:21 UTC
rendering simple caja gadget
How can we do the equivalent of sample1.html with caja? Here is what we
tried:
*test-spec.xml:*
<Module>
<ModulePrefs title="Hello World">
<Require feature="caja"/>
</ModulePrefs>
<Content type="html">
<![CDATA[ <p>caja are you there?</p> ]]>
</Content>
</Module>
*renderGadget():*
var gadget0 = gadgets.container.createGadget({specUrl: "
http://ourserver.com/test-spec.xml"});
gadgets.container.addGadget(gadget0);
gadgets.container.layoutManager.setGadgetChromeIds(['gadget-chrome-x']);
gadgets.container.renderGadget(gadget0);
This did render the gadget, but it is still in an iframe and firebug shows
these errors:
Internal: Simple functions can't be exophora: function (v) { valijaMaker =
v; }
Error(message);}function
enforce(test,...},Array.slice(arguments,1));}function
opensocial is not defined
$v is undefined
Help!
Re: rendering simple caja gadget
Posted by Robert Peterson <ju...@gmail.com>.
The primary reason we are thinking about utilizing caja is for performance.
The caja site says that if no iframe is used, this can improve performance.
I read an email to this list somewhere that suggested enabling caja /w
Shindig actually slows things down. Since inlining isn't supported, I'd
imagine this is definitely true, no?
Thanks,
Robert
2010/3/1 ๏̯͡๏ Jasvir Nagra <ja...@google.com>
> On Mon, Mar 1, 2010 at 6:25 PM, Robert Peterson <juzzam.shindig@gmail.com
> >wrote:
>
> > How can we do the equivalent of sample1.html with caja? Here is what we
> > tried:
> >
> > *test-spec.xml:*
> > <Module>
> > <ModulePrefs title="Hello World">
> > <Require feature="caja"/>
> > </ModulePrefs>
> > <Content type="html">
> > <![CDATA[ <p>caja are you there?</p> ]]>
> > </Content>
> > </Module>
> >
> > *renderGadget():*
> > var gadget0 = gadgets.container.createGadget({specUrl: "
> > http://ourserver.com/test-spec.xml"});
> > gadgets.container.addGadget(gadget0);
> > gadgets.container.layoutManager.setGadgetChromeIds(['gadget-chrome-x']);
> > gadgets.container.renderGadget(gadget0);
> >
> > This did render the gadget, but it is still in an iframe and firebug
> shows
> >
>
> Shindig does not support inlined rendering with Caja.
>
>
> > these errors:
> >
> > Internal: Simple functions can't be exophora: function (v) { valijaMaker
> =
> > v; }
> > Error(message);}function
> > enforce(test,...},Array.slice(arguments,1));}function
> > opensocial is not defined
> > $v is undefined
> >
>
> Your gadget looks fine (and loads fine in samplecontainer). These errors
> look like they are from a misconfigured container - I am not familiar with
> sample1.html but I'd started by ensuring it overrides
> gadgets.Gadget.prototype.getAdditionalParams to pass "&caja=1&libs=caja" to
> the gadget rewriter. See samplecontainer/samplecontainer.js for an
> example.
>
>
> >
> > Help!
> >
>
Re: rendering simple caja gadget
Posted by ๏̯͡๏ Jasvir Nagra <ja...@google.com>.
On Mon, Mar 1, 2010 at 6:25 PM, Robert Peterson <ju...@gmail.com>wrote:
> How can we do the equivalent of sample1.html with caja? Here is what we
> tried:
>
> *test-spec.xml:*
> <Module>
> <ModulePrefs title="Hello World">
> <Require feature="caja"/>
> </ModulePrefs>
> <Content type="html">
> <![CDATA[ <p>caja are you there?</p> ]]>
> </Content>
> </Module>
>
> *renderGadget():*
> var gadget0 = gadgets.container.createGadget({specUrl: "
> http://ourserver.com/test-spec.xml"});
> gadgets.container.addGadget(gadget0);
> gadgets.container.layoutManager.setGadgetChromeIds(['gadget-chrome-x']);
> gadgets.container.renderGadget(gadget0);
>
> This did render the gadget, but it is still in an iframe and firebug shows
>
Shindig does not support inlined rendering with Caja.
> these errors:
>
> Internal: Simple functions can't be exophora: function (v) { valijaMaker =
> v; }
> Error(message);}function
> enforce(test,...},Array.slice(arguments,1));}function
> opensocial is not defined
> $v is undefined
>
Your gadget looks fine (and loads fine in samplecontainer). These errors
look like they are from a misconfigured container - I am not familiar with
sample1.html but I'd started by ensuring it overrides
gadgets.Gadget.prototype.getAdditionalParams to pass "&caja=1&libs=caja" to
the gadget rewriter. See samplecontainer/samplecontainer.js for an example.
>
> Help!
>