Revision: 4559
Author:   ihab.awad
Date:     Sat Jul 16 09:56:43 2011
Log:      Fix to caja.js docs.

http://code.google.com/p/google-caja/source/detail?r=4559

Modified:
 /trunk/doc/cajajs/cajajs.xml

=======================================
--- /trunk/doc/cajajs/cajajs.xml        Fri Jul 15 15:31:24 2011
+++ /trunk/doc/cajajs/cajajs.xml        Sat Jul 16 09:56:43 2011
@@ -60,12 +60,12 @@
     </property>

     <method>
-      <name>setDefaults</name>
+      <name>initialize</name>
       <doc><p>Sets the default parameters for Caja.</p><p>This method
       must be called before any calls to <code>whenReady</code> or
       <code>load</code>. If either of these is called first, a built-in
       set of parameters will be used and any subsequent calls to
-      <code>setDefaults</code> will throw. The resulting exceptions leave
+      <code>initialize</code> will throw. The resulting exceptions leave
       Caja in a consistent state.</p></doc>
       <arg>
         <name>params</name>
@@ -329,7 +329,7 @@
       <doc>
 <pre class="prettyprint lang-javascript">
 /* <strong>host page code</strong> */
-caja.setDefaults({
+caja.initialize({
   cajaServer: 'http://caja.appspot.com/',
   debug: false
 });
@@ -340,27 +340,27 @@
     </example>

     <example>
-      <title>Erroneous <code>setDefaults</code></title>
+      <title>Erroneous <code>initialize</code></title>
       <doc>
 <pre class="prettyprint lang-javascript">
 /* <strong>host page code</strong> */
 caja.whenReady(function() { /* ... */ });
-caja.setDefaults({ /* ... */ });
+caja.initialize({ /* ... */ });
 </pre>
-        <p>The call to <code>setDefaults</code> throws since
+        <p>The call to <code>initialize</code> throws since
         <code>whenReady</code> has already been called.</p>
       </doc>
     </example>

     <example>
-      <title>Erroneous <code>setDefaults</code></title>
+      <title>Erroneous <code>initialize</code></title>
       <doc>
 <pre class="prettyprint lang-javascript">
 /* <strong>host page code</strong> */
 caja.load( /* ... */ );
-caja.setDefaults({ /* ... */ });
+caja.initialize({ /* ... */ });
 </pre>
-        <p>The call to <code>setDefaults</code> throws since
+        <p>The call to <code>initialize</code> throws since
         <code>load</code> has already been called.</p>
       </doc>
     </example>
@@ -406,7 +406,7 @@
         <p>Then the following code in the page:</p>
 <pre class="prettyprint lang-javascript">
 /* <strong>host page code</strong> */
-caja.setDefaults({ cajaServer: 'http://caja.appspot.com' });
+caja.initialize({ cajaServer: 'http://caja.appspot.com' });
 caja.load(
     document.getElementById('guestDiv'),
     undefined,  // no network access
@@ -429,7 +429,7 @@
         <p>The following code in a host page:</p>
 <pre class="prettyprint lang-javascript">
 /* <strong>host page code</strong> */
-caja.setDefaults({ cajaServer: 'http://caja.appspot.com' });
+caja.initialize({ cajaServer: 'http://caja.appspot.com' });
 caja.load(
     undefined,  // no DOM access
     undefined,  // no network access
@@ -471,7 +471,7 @@
   alert(String(s));
 };

-caja.setDefaults({ cajaServer: 'http://caja.appspot.com' });
+caja.initialize({ cajaServer: 'http://caja.appspot.com' });
 caja.whenReady(function() {
   caja.markTameAsFunction(restrictedAlert);
 });

Reply via email to