Skip to content

Commit dddb83a

Browse files
committed
Added function args and return
1 parent 47c1c65 commit dddb83a

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

index.html

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,46 @@ <h4>Functions:</h4>
124124
{%each functions as function%}
125125
<li id="{{jsClassName}}/function/{{function.jsFunctionName}}">
126126
<strong class="{%if not function.ignore%}is{%else%}not{%endif%} added">{{jsClassName}}#</strong><strong class="method">{{function.jsFunctionName}}</strong>
127+
<h4>Arguments:</h4>
128+
<div class="arguments">
129+
{%if function.args.length > 2%}
130+
<table class="pure-table">
131+
<thead>
132+
<tr>
133+
<th><sub>Name</sub></th>
134+
<th><sub>Type</sub></th>
135+
<th><sub>Comment</sub></th>
136+
</tr>
137+
</thead>
138+
<tbody>
139+
{%each function.args as arg%}
140+
{%if not arg.isReturn%}
141+
{%if not arg.isSelf%}
142+
<tr>
143+
<td><strong>{{arg.name}}</strong></td>
144+
<td>{{ arg.jsClassName }}</td>
145+
<td>{{ arg.comment }}</td>
146+
</tr>
147+
{%endif%}
148+
{%endif%}
149+
{%endeach%}
150+
</tbody>
151+
</table>
152+
{%else%}
153+
<span>No arguments.</span>
154+
{%endif%}
155+
</div>
156+
157+
<h4>Returns:</h4>
158+
<div class="arguments">
159+
{%if function.return.isErrorCode%}
160+
<span>An error code.</span>
161+
{%elsif isAsync%}
162+
<span>A Promise.</span>
163+
{%else%}
164+
<span>{{ function.return.jsClassName }}</span>
165+
{%endif%}
166+
</div>
127167
</li>
128168
{%endeach%}
129169
</ul>

styles/api.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,3 +140,14 @@ ul.api-contents table h3 {
140140
.api-content .inner-block h3 {
141141
margin-top: 0px;
142142
}
143+
144+
.arguments {
145+
border: 1px solid #C6C6C6;
146+
padding: 10px;
147+
margin: 15px 0px;
148+
background: #F5F5F5;
149+
}
150+
151+
.functions h4 {
152+
color: #7A7A7A;
153+
}

0 commit comments

Comments
 (0)