comparison xml/en/docs/http/ngx_http_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 3cbd6e440581
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_http_js_module" 9 <module name="Module ngx_http_js_module"
10 link="/en/docs/http/ngx_http_js_module.html" 10 link="/en/docs/http/ngx_http_js_module.html"
11 lang="en" 11 lang="en"
12 rev="28"> 12 rev="29">
13 13
14 <section id="summary"> 14 <section id="summary">
15 15
16 <para> 16 <para>
17 The <literal>ngx_http_js_module</literal> module is used to implement 17 The <literal>ngx_http_js_module</literal> module is used to implement
317 its handler will not be executed until the log phase. 317 its handler will not be executed until the log phase.
318 This handler can be used to do some cleanup 318 This handler can be used to do some cleanup
319 right before the request is freed. 319 right before the request is freed.
320 </para> 320 </para>
321 321
322 <para>
323 <note>
324 As the <literal>js_set</literal> handler
325 returns its result immediately, it supports
326 only synchronous callbacks.
327 Thus, asynchronous callbacks such as
328 <link doc="../njs/reference.xml" id="r_subrequest">r.subrequest()</link>
329 or
330 <link doc="../njs/reference.xml" id="settimeout">setTimeout()</link>
331 are not supported.
332 </note>
333 </para>
334
322 </directive> 335 </directive>
323 336
324 337
325 <directive name="js_var"> 338 <directive name="js_var">
326 <syntax><value>$variable</value> [<value>value</value>]</syntax> 339 <syntax><value>$variable</value> [<value>value</value>]</syntax>