Mercurial > hg > nginx-site
comparison xml/en/docs/http/ngx_http_js_module.xml @ 2686:45214e5316cd
Improved description of js_set.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Fri, 19 Mar 2021 18:24:34 +0000 |
parents | 8751cab1d562 |
children | 3cbd6e440581 |
comparison
equal
deleted
inserted
replaced
2685:5282d6d3d849 | 2686:45214e5316cd |
---|---|
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="26"> | 12 rev="27"> |
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 |
296 <value>module.function</value></syntax> | 296 <value>module.function</value></syntax> |
297 <default/> | 297 <default/> |
298 <context>http</context> | 298 <context>http</context> |
299 | 299 |
300 <para> | 300 <para> |
301 Sets an njs function for the specified variable. | 301 Sets an njs <literal>function</literal> |
302 for the specified <literal>variable</literal>. | |
302 Since <link doc="../njs/changes.xml" id="njs0.4.0">0.4.0</link>, | 303 Since <link doc="../njs/changes.xml" id="njs0.4.0">0.4.0</link>, |
303 a module function can be referenced. | 304 a module function can be referenced. |
304 </para> | 305 </para> |
305 | 306 |
307 <para> | |
308 The function is called when | |
309 the variable is referenced for the first time for a given request. | |
310 The exact moment depends on a | |
311 <link doc="../dev/development_guide.xml" id="http_phases">phase</link> | |
312 at which the variable is referenced. | |
313 This can be used to perform some logic | |
314 not related to variable evaluation. | |
315 For example, if the variable is referenced only in the | |
316 <link doc="ngx_http_log_module.xml" id="log_format"/> directive, | |
317 its handler will not be executed until the log phase. | |
318 This handler can be used to do some cleanup | |
319 right before the request is freed. | |
320 </para> | |
321 | |
306 </directive> | 322 </directive> |
307 | 323 |
308 </section> | 324 </section> |
309 | 325 |
310 | 326 |