Mercurial > hg > nginx-site
comparison xml/en/docs/stream/ngx_stream_js_module.xml @ 2747:42fb92e582db
Added note to js_set about asyncronous calls.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Mon, 05 Jul 2021 15:32:26 +0100 |
parents | a45ba3a1d999 |
children | a2852750c379 |
comparison
equal
deleted
inserted
replaced
2746:438e5c551d67 | 2747:42fb92e582db |
---|---|
7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> | 7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
8 | 8 |
9 <module name="Module ngx_stream_js_module" | 9 <module name="Module ngx_stream_js_module" |
10 link="/en/docs/stream/ngx_stream_js_module.html" | 10 link="/en/docs/stream/ngx_stream_js_module.html" |
11 lang="en" | 11 lang="en" |
12 rev="27"> | 12 rev="28"> |
13 | 13 |
14 <section id="summary"> | 14 <section id="summary"> |
15 | 15 |
16 <para> | 16 <para> |
17 The <literal>ngx_stream_js_module</literal> module is used to implement | 17 The <literal>ngx_stream_js_module</literal> module is used to implement |
278 its handler will not be executed until the log phase. | 278 its handler will not be executed until the log phase. |
279 This handler can be used to do some cleanup | 279 This handler can be used to do some cleanup |
280 right before the request is freed. | 280 right before the request is freed. |
281 </para> | 281 </para> |
282 | 282 |
283 <para> | |
284 <note> | |
285 As the <literal>js_set</literal> handler | |
286 returns its result immediately, it supports | |
287 only synchronous callbacks. | |
288 Thus, asynchronous callbacks such as | |
289 <link doc="../njs/reference.xml" id="ngx_fetch">ngx.fetch()</link> | |
290 or | |
291 <link doc="../njs/reference.xml" id="settimeout">setTimeout()</link> | |
292 are not supported. | |
293 </note> | |
294 </para> | |
295 | |
283 </directive> | 296 </directive> |
284 | 297 |
285 | 298 |
286 <directive name="js_var"> | 299 <directive name="js_var"> |
287 <syntax><value>$variable</value> [<value>value</value>]</syntax> | 300 <syntax><value>$variable</value> [<value>value</value>]</syntax> |