mozilla

Revision 127842 of Template:JP APIPage

  • Revision slug: Template:JP_APIPage
  • Revision title: Template:JP APIPage
  • Revision id: 127842
  • Created:
  • Creator: kurt_cagle
  • Is current revision? No
  • Comment 250 words added
Tags: 

Revision Content

Constructors

template("JP_Constructor",{
     name:"Constructor-Name",
     type:"Constructor-Type",
     id:"Menu1",
     description:"This is the description of the constructor. The description for each parameter can take markup, but printable quotes need to be escaped.",
     params:[
          {name:"Param1",
            type:"Param1Type",
            description:"You can have zero or more parameters associated with the constructor function. The description for each parameter can take markup, but printable quotes need to be escaped."
            }]
     })

template("JP_Example",{
      title:"A Simple Example",
      textBefore:"This is preamble text to the example.
It can incorporate markup, but single and double quotes must either be escaped as \\\' or \\\" or replaced with &squot; and " respectively. ",
      listing:
'for (var i=0;i !=10;i++){
    foo[i] += 1;
    print("For " + i + ", the answer is "+foo[i]+".")
 };',
     textAfter:"This is postfix text.
It can incorporate markup, but single and double quotes must either be escaped as \\\' or \\\" or replaced with &squot; and " respectively."})


Methods

template("JP_Method",{
     name:"Method-Name",
     type:"Method-Type",
     id:"Menu1",
     description:"This is the description of a method. The description for each parameter can take markup, but printable quotes need to be escaped.",
     params:[
          {name:"Param1",
            type:"Param1Type",
            description:"You can have zero or more parameters associated with the constructor function. The description for each parameter can take markup, but printable quotes need to be escaped."
            }]
     })

template("JP_Example",{
      title:"A Simple Example",
      textBefore:"This is preamble text to the example.
It can incorporate markup, but single and double quotes must either be escaped as \\\' or \\\" or replaced with &squot; and " respectively. ",
      listing:
'for (var i=0;i !=10;i++){
    foo[i] += 1;
    print("For " + i + ", the answer is "+foo[i]+".")
 };',
     textAfter:"This is postfix text.
It can incorporate markup, but single and double quotes must either be escaped as \\\' or \\\" or replaced with &squot; and " respectively."})

Revision Source

<h2>Constructors</h2>
<p><span class="script">template("JP_Constructor",{<br />
     name:"Constructor-Name",<br />
     type:"Constructor-Type",<br />
     id:"Menu1",<br />
     description:"This is the description of <span style=\"color:red\">the constructor</span>. The description for each parameter can take markup, but printable quotes need to be escaped.",<br />
     params:[<br />
          {name:"Param1",<br />
            type:"Param1Type",<br />
            description:"You can have zero or more parameters associated with the constructor function. The description for each parameter can take markup, but printable quotes need to be escaped."<br />
            }]<br />
     })<br />
</span><br />
<span class="script">template("JP_Example",{<br />
      title:"A Simple Example",<br />
      textBefore:"This is preamble text to the example.<br/>It can incorporate markup, but single and double quotes must either be escaped as \\\' or \\\" or replaced with &amp;squot; and &amp;quot; respectively. ",<br />
      listing:<br />
'for (var i=0;i !=10;i++){<br />
    foo[i] += 1;<br />
    print("For " + i + ", the answer is "+foo[i]+".")<br />
 };',<br />
     textAfter:"This is postfix text.<br/>It can incorporate markup, but single and double quotes must either be escaped as \\\' or \\\" or replaced with &amp;squot; and &amp;quot; respectively."})<br />
</span><br />
<hr/></p>
<h2>Methods</h2>
<p><span class="script">template("JP_Method",{<br />
     name:"Method-Name",<br />
     type:"Method-Type",<br />
     id:"Menu1",<br />
     description:"This is the description of a <span style=\"color:blue\">method</span>. The description for each parameter can take markup, but printable quotes need to be escaped.",<br />
     params:[<br />
          {name:"Param1",<br />
            type:"Param1Type",<br />
            description:"You can have zero or more parameters associated with the constructor function. The description for each parameter can take markup, but printable quotes need to be escaped."<br />
            }]<br />
     })<br />
</span><br />
<span class="script">template("JP_Example",{<br />
      title:"A Simple Example",<br />
      textBefore:"This is preamble text to the example.<br/>It can incorporate markup, but single and double quotes must either be escaped as \\\' or \\\" or replaced with &amp;squot; and &amp;quot; respectively. ",<br />
      listing:<br />
'for (var i=0;i !=10;i++){<br />
    foo[i] += 1;<br />
    print("For " + i + ", the answer is "+foo[i]+".")<br />
 };',<br />
     textAfter:"This is postfix text.<br/>It can incorporate markup, but single and double quotes must either be escaped as \\\' or \\\" or replaced with &amp;squot; and &amp;quot; respectively."})<br />
</span></p>