On Fri, Jan 2, 2009 at 4:57 PM, Matthew Russell <
[email protected]> wrote:
> Hello,
>
> I've been doing some basic development with Shindig (HEAD), and just
> recently been trying to use Caja (versus just read about it.) I can't seem
> to find very good guidance on getting Caja to work with Shindig and gadgets,
> so I'm assuming it's probably supposed to be easier than I'm making it.
>
> So, I was wondering if I could get some help understanding why the
> following things do not work, and what I would do to get them to work. I've
> included a simple gadget below with the most basic things I could think of
> trying to do. If I can get a hand understanding what's going on here, I'll
> do what I can to help with docs in the way of short articles and such things
> since there doesn't seem to be many of those around these days.
Some of these issues are shindig-related. Others should probably go to the
caja discussion list.
>
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <Module>
> <ModulePrefs title="Cajoled Gadgets Example">
> <Require feature="minimessage"/>
> <Require feature="opensocial-0.8"/>
> <Require feature="caja"/>
> </ModulePrefs>
> <Content type="html">
> <![CDATA[
> <script type="text/javascript">
>
> /*#1 - this doesn't work - get error about untamed function.
> how to tame it? should i be doing this manually?
> */
> //var msg = new gadgets.MiniMessage(__MODULE_ID__);
> //msg.createDismissibleMessage("hello?");
At present, only the "opensocial-0.x" feature is tamed. A "tamed" function
is one that has been wrapped in a special way to indicate to caja that it is
safe for third parties to call it.
Taming the remaining libraries is the biggest outstanding problem with
deploying caja at the moment.
>
>
> /*#2 - this doesn't work either - get message about
> "x0__ being null" */
> //gadgets.util.registerOnLoadHandler(function() {
> // document.getElementById("foo").innerHTML = "bar";
> //});
>
> /*#3 -this doesn't work either - "this.node__ is undefined"
> */
> //var e = document.createElement("div");
> //e.innerHTML = "foobar";
> //document.appendChild(e);
>
> /*#4 nor does this work - "invalid instanceof operand
> result"*/
> console.log("hello?");
No idea on any of these last items.
>
> </script>
> <div id="foo">hello?</div>
> ]]>
> </Content>
> </Module>
>