comparison xml/en/docs/njs/reference.xml @ 2337:867fe207f13e

Updated links to changes.xml in njs Reference.
author Yaroslav Zhuravlev <yar@nginx.com>
date Wed, 27 Feb 2019 15:29:16 +0300
parents 9d502d4305ac
children 39ac205f90b7
comparison
equal deleted inserted replaced
2336:702e7aaf188f 2337:867fe207f13e
219 <list type="tag"> 219 <list type="tag">
220 220
221 <tag-name id="s_allow"><literal>s.allow()</literal></tag-name> 221 <tag-name id="s_allow"><literal>s.allow()</literal></tag-name>
222 <tag-desc> 222 <tag-desc>
223 successfully finalizes the phase handler 223 successfully finalizes the phase handler
224 (<link doc="../njs/changes.xml" id="njs0.2.4">0.2.4</link>) 224 (<link doc="changes.xml" id="njs0.2.4">0.2.4</link>)
225 </tag-desc> 225 </tag-desc>
226 226
227 <tag-name id="s_decline"><literal>s.decline()</literal></tag-name> 227 <tag-name id="s_decline"><literal>s.decline()</literal></tag-name>
228 <tag-desc> 228 <tag-desc>
229 finalizes the phase handler and passes control to the next handler 229 finalizes the phase handler and passes control to the next handler
230 (<link doc="../njs/changes.xml" id="njs0.2.4">0.2.4</link>) 230 (<link doc="changes.xml" id="njs0.2.4">0.2.4</link>)
231 </tag-desc> 231 </tag-desc>
232 232
233 <tag-name id="s_deny"><literal>s.deny()</literal></tag-name> 233 <tag-name id="s_deny"><literal>s.deny()</literal></tag-name>
234 <tag-desc> 234 <tag-desc>
235 finalizes the phase handler with the access error code 235 finalizes the phase handler with the access error code
236 (<link doc="../njs/changes.xml" id="njs0.2.4">0.2.4</link>) 236 (<link doc="changes.xml" id="njs0.2.4">0.2.4</link>)
237 </tag-desc> 237 </tag-desc>
238 238
239 <tag-name id="s_done"><literal>s.done</literal>(<value>[code]</value>)</tag-name> 239 <tag-name id="s_done"><literal>s.done</literal>(<value>[code]</value>)</tag-name>
240 <tag-desc> 240 <tag-desc>
241 successfully finalizes the current phase handler 241 successfully finalizes the current phase handler
242 or finalizes it with the specified numeric code 242 or finalizes it with the specified numeric code
243 (<link doc="../njs/changes.xml" id="njs0.2.4">0.2.4</link>). 243 (<link doc="changes.xml" id="njs0.2.4">0.2.4</link>).
244 </tag-desc> 244 </tag-desc>
245 245
246 <tag-name><literal>s.error(<value>string</value>)</literal></tag-name> 246 <tag-name><literal>s.error(<value>string</value>)</literal></tag-name>
247 <tag-desc> 247 <tag-desc>
248 writes a sent <literal>string</literal> to the error log 248 writes a sent <literal>string</literal> to the error log
256 </tag-desc> 256 </tag-desc>
257 257
258 <tag-name id="s_off"><literal>s.off(<value>eventName</value>)</literal></tag-name> 258 <tag-name id="s_off"><literal>s.off(<value>eventName</value>)</literal></tag-name>
259 <tag-desc> 259 <tag-desc>
260 unregisters the callback set by the <link id="s_on">s.on()</link> method 260 unregisters the callback set by the <link id="s_on">s.on()</link> method
261 (<link doc="../njs/changes.xml" id="njs0.2.4">0.2.4</link>) 261 (<link doc="changes.xml" id="njs0.2.4">0.2.4</link>)
262 </tag-desc> 262 </tag-desc>
263 263
264 <tag-name id="s_on"><literal>s.on(<value>event</value>, 264 <tag-name id="s_on"><literal>s.on(<value>event</value>,
265 <value>callback</value>)</literal></tag-name> 265 <value>callback</value>)</literal></tag-name>
266 <tag-desc> 266 <tag-desc>
267 registers a <literal>callback</literal> for the specified <literal>event</literal> 267 registers a <literal>callback</literal> for the specified <literal>event</literal>
268 (<link doc="../njs/changes.xml" id="njs0.2.4">0.2.4</link>). 268 (<link doc="changes.xml" id="njs0.2.4">0.2.4</link>).
269 269
270 <para> 270 <para>
271 An <literal>event</literal> may be one of the following strings: 271 An <literal>event</literal> may be one of the following strings:
272 <list type="tag"> 272 <list type="tag">
273 <tag-name><literal>upload</literal></tag-name> 273 <tag-name><literal>upload</literal></tag-name>
306 306
307 <tag-name id="s_send"><literal>s.send(<value>data</value>[, 307 <tag-name id="s_send"><literal>s.send(<value>data</value>[,
308 <value>options</value>])</literal></tag-name> 308 <value>options</value>])</literal></tag-name>
309 <tag-desc> 309 <tag-desc>
310 sends the data to the client 310 sends the data to the client
311 (<link doc="../njs/changes.xml" id="njs0.2.4">0.2.4</link>). 311 (<link doc="changes.xml" id="njs0.2.4">0.2.4</link>).
312 The <literal>options</literal> is an object used 312 The <literal>options</literal> is an object used
313 to override nginx buffer flags derived from an incoming data chunk buffer. 313 to override nginx buffer flags derived from an incoming data chunk buffer.
314 The flags can be overriden with the following flags: 314 The flags can be overriden with the following flags:
315 <para> 315 <para>
316 <list type="tag"> 316 <list type="tag">
427 <tag-name id="string_bytesfrom"><literal>String.bytesFrom(<value>array</value> 427 <tag-name id="string_bytesfrom"><literal>String.bytesFrom(<value>array</value>
428 | <value>string</value>, <value>encoding</value>)</literal></tag-name> 428 | <value>string</value>, <value>encoding</value>)</literal></tag-name>
429 <tag-desc> 429 <tag-desc>
430 (njs specific) Creates a byte string either from an array that contains octets, 430 (njs specific) Creates a byte string either from an array that contains octets,
431 or from an encoded string 431 or from an encoded string
432 (<link doc="../njs/changes.xml" id="njs0.2.3">0.2.3</link>). 432 (<link doc="changes.xml" id="njs0.2.3">0.2.3</link>).
433 The encoding can be 433 The encoding can be
434 <literal>hex</literal>, 434 <literal>hex</literal>,
435 <literal>base64</literal>, and 435 <literal>base64</literal>, and
436 <literal>base64url</literal>. 436 <literal>base64url</literal>.
437 <example> 437 <example>
596 <tag-name id="string_padend"><literal>String.prototype.padEnd(<value>length</value> 596 <tag-name id="string_padend"><literal>String.prototype.padEnd(<value>length</value>
597 [, <value>string</value>])</literal></tag-name> 597 [, <value>string</value>])</literal></tag-name>
598 <tag-desc> 598 <tag-desc>
599 Returns a string of a specified <literal>length</literal> 599 Returns a string of a specified <literal>length</literal>
600 with the pad <literal>string</literal> applied to the end of the specified 600 with the pad <literal>string</literal> applied to the end of the specified
601 string (<link doc="../njs/changes.xml" id="njs0.2.3">0.2.3</link>). 601 string (<link doc="changes.xml" id="njs0.2.3">0.2.3</link>).
602 <example> 602 <example>
603 >> '1234'.padEnd(8, 'abcd') 603 >> '1234'.padEnd(8, 'abcd')
604 '1234abcd' 604 '1234abcd'
605 </example> 605 </example>
606 </tag-desc> 606 </tag-desc>
608 <tag-name id="string_padstart"><literal>String.prototype.padStart(<value>length</value> 608 <tag-name id="string_padstart"><literal>String.prototype.padStart(<value>length</value>
609 [, <value>string</value>])</literal></tag-name> 609 [, <value>string</value>])</literal></tag-name>
610 <tag-desc> 610 <tag-desc>
611 Returns a string of a specified <literal>length</literal> 611 Returns a string of a specified <literal>length</literal>
612 with the pad <literal>string</literal> applied to the start of the specified 612 with the pad <literal>string</literal> applied to the start of the specified
613 string (<link doc="../njs/changes.xml" id="njs0.2.3">0.2.3</link>). 613 string (<link doc="changes.xml" id="njs0.2.3">0.2.3</link>).
614 <example> 614 <example>
615 >> '1234'.padStart(8, 'abcd') 615 >> '1234'.padStart(8, 'abcd')
616 'abcd1234' 616 'abcd1234'
617 </example> 617 </example>
618 </tag-desc> 618 </tag-desc>