You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Kevin Reid edited this page Apr 16, 2015
·
1 revision
(legacy summary: Resources for end-users using caja)
How do I use Caja?
Caja turns a piece of Web content -- roughly, a snippet of HTML, CSS
and JavaScript that you would see within the body tag of an HTML
page -- into a Caja module. This module is represented as a single
JavaScript module function that can be run within a Caja container.
Caja is currently used both for securing gadgets and plain webpages.
Caja for Gadgets
In practice, the most common place you may need to write in Caja is
when creating Opensocial gadgets. Some opensocial containers (such as
YAP, Shindig, iGoogle, Code Wiki and Orkut) support Caja.
To turn on caja, you require the caja feature with <Require feature="caja" />.
For example, here is a trivial Hello World OpenSocial gadget:
If you want to host your own gadgets or user-submitted content, see HostingModules for how to write a host page and RunningCaja for getting the cajoler and Cajita runtime set up.