comparison xml/en/docs/http/ngx_http_js_module.xml @ 1844:f56626ce9c40

Changed JavaScript to nginScript.
author Yaroslav Zhuravlev <yar@nginx.com>
date Thu, 01 Dec 2016 14:41:04 +0300
parents 15632fc2d548
children bfac366fa1e4
comparison
equal deleted inserted replaced
1843:3492eb9b8138 1844:f56626ce9c40
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="1"> 12 rev="2">
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
18 location and variable handlers in JavaScript. 18 location and variable handlers
19 in nginScript —
20 a subset of the JavaScript language.
19 </para> 21 </para>
20 22
21 <para> 23 <para>
22 This module is not built by default, it should be compiled with 24 This module is not built by default, it should be compiled with
23 nginx JavaScript module using the 25 the nginScript module using the
24 <literal>--add_module</literal> configuration parameter: 26 <literal>--add_module</literal> configuration parameter:
25 <example> 27 <example>
26 ./configure --add-module=<value>path-to-njs</value>/nginx 28 ./configure --add-module=<value>path-to-njs</value>/nginx
27 </example> 29 </example>
28 The <link url="http://hg.nginx.org/njs">repository</link> 30 The <link url="http://hg.nginx.org/njs">repository</link>
29 with nginx JavaScript module can be cloned with the following command 31 with the nginScript module can be cloned with the following command
30 (requires <link url="https://www.mercurial-scm.org">Mercurial</link> client): 32 (requires <link url="https://www.mercurial-scm.org">Mercurial</link> client):
31 <example> 33 <example>
32 hg clone http://hg.nginx.org/njs 34 hg clone http://hg.nginx.org/njs
33 </example> 35 </example>
34 This module can also be built as 36 This module can also be built as
131 <context>http</context> 133 <context>http</context>
132 <context>server</context> 134 <context>server</context>
133 <context>location</context> 135 <context>location</context>
134 136
135 <para> 137 <para>
136 Specifies a file that implements location and variable handlers in JavaScript. 138 Specifies a file that implements location and variable handlers in nginScript.
137 </para> 139 </para>
138 140
139 </directive> 141 </directive>
140 142
141 143
144 <default/> 146 <default/>
145 <context>location</context> 147 <context>location</context>
146 <context>limit_except</context> 148 <context>limit_except</context>
147 149
148 <para> 150 <para>
149 Sets a JavaScript function as a location content handler. 151 Sets an nginScript function as a location content handler.
150 </para> 152 </para>
151 153
152 </directive> 154 </directive>
153 155
154 156
159 <context>http</context> 161 <context>http</context>
160 <context>server</context> 162 <context>server</context>
161 <context>location</context> 163 <context>location</context>
162 164
163 <para> 165 <para>
164 Sets a JavaScript function for the specified variable. 166 Sets an nginScript function for the specified variable.
165 </para> 167 </para>
166 168
167 </directive> 169 </directive>
168 170
169 </section> 171 </section>
170 172
171 173
172 <section id="arguments" name="Request and Response Arguments"> 174 <section id="arguments" name="Request and Response Arguments">
173 <para> 175 <para>
174 Each HTTP JavaScript handler receives two arguments, request and response. 176 Each HTTP nginScript handler receives two arguments, request and response.
175 </para> 177 </para>
176 178
177 <para> 179 <para>
178 The request object has the following properties: 180 The request object has the following properties:
179 <list type="tag"> 181 <list type="tag">