mozilla

Revision 126429 of Template:JP Method

  • Revision slug: Template:JP_Method
  • Revision title: Template:JP Method
  • Revision id: 126429
  • Created:
  • Creator: kurt_cagle
  • Is current revision? No
  • Comment 8 words added, 2 words removed

Revision Content

$name(buf = [];foreach(var param in $params){buf += [''+param.name+' as '+param.type+'']};paramList = web.html(""+string.join(buf,", ")+"");paramList ) as $type

Description
web.html(""+$description+"")
if ($params[0]["properties"] == null){buf = [];buf += ['
    '];foreach(var param in $params){buf += ['
  • '+param.name+'. '+param.description+'
  • ']};buf += ['
'];paramDescrs = web.html(""+string.join(buf,"")+""); paramDescrs} else { props = $params[0].properties;buf = [];buf += [''];foreach(var prop in props){buf += ['']};buf += ['
Property NameProperty TypeRequired?Default ValueDescription
'+prop.name+''+prop.type+''+(prop.required?"Required":"Optional")+''+(prop.required?"n/a":prop.default)+''+prop.description+'
'];paramDescrs = web.html(""+string.join(buf,"")+""); paramDescrs }

Revision Source

<h3 class="method" id="{{if ($id!=null){$id} else {$name}}}"><a name="{{if ($id!=null) {$id} else {$name}}}" /><span class="method-name"><span class="script">$name</span></span>(<span class="script">buf = [];foreach(var param in $params){buf += ['<b class="param-name">'+param.name+'</b> as <i class="param-type">'+param.type+'</i>']};paramList = web.html(""+string.join(buf,", ")+"");paramList </span>) as <span class="method-type"><span class="script">$type</span></span></h3>
<div class="label"><strong>Description</strong></div>
<div class="description"><span class="script">web.html(""+$description+"")</span></div>
<div><span class="script">if ($params[0]["properties"] == null){buf = [];buf += ['<ul class="params-descr">'];foreach(var param in $params){buf += [' <li class="param-descr"><b class="param-descr-label">'+param.name+'</b>. <i class="param-descr-body">'+param.description+'</i></li>']};buf += ['</ul>'];paramDescrs = web.html(""+string.join(buf,"")+""); paramDescrs} else { props = $params[0].properties;buf = [];buf += ['<table style="width: auto;" class="standard-table"><tr><th>Property Name</th><th>Property Type</th><th>Required?</th><th>Default Value</th><th>Description</th><tr>'];foreach(var prop in props){buf += ['<tr><td>'+prop.name+'</td><td>'+prop.type+'</td><td>'+(prop.required?"Required":"Optional")+'</td><td>'+(prop.required?"n/a":prop.default)+'</td><td>'+prop.description+'</td></tr>']};buf += ['</table>'];paramDescrs = web.html(""+string.join(buf,"")+""); paramDescrs } </span></div>