On Mon, Mar 1, 2010 at 6:25 PM, Robert Peterson <[email protected]>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!
>