comparison xml/en/docs/stream/ngx_stream_js_module.xml @ 2882:986e1f930e3b

Documented server, location, if contexts for some js directives.
author Yaroslav Zhuravlev <yar@nginx.com>
date Thu, 18 Aug 2022 15:44:39 +0100
parents fd8ec06ceafa
children 9719a0184a67
comparison
equal deleted inserted replaced
2881:e59e8645055d 2882:986e1f930e3b
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="32"> 12 rev="33">
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
379 <directive name="js_import"> 379 <directive name="js_import">
380 <syntax><value>module.js</value> | 380 <syntax><value>module.js</value> |
381 <value>export_name from module.js</value></syntax> 381 <value>export_name from module.js</value></syntax>
382 <default/> 382 <default/>
383 <context>stream</context> 383 <context>stream</context>
384 <context>server</context>
384 <appeared-in>0.4.0</appeared-in> 385 <appeared-in>0.4.0</appeared-in>
385 386
386 <para> 387 <para>
387 Imports a module that implements location and variable handlers in njs. 388 Imports a module that implements location and variable handlers in njs.
388 The <literal>export_name</literal> is used as a namespace 389 The <literal>export_name</literal> is used as a namespace
400 401
401 <para> 402 <para>
402 Several <literal>js_import</literal> directives can be specified. 403 Several <literal>js_import</literal> directives can be specified.
403 </para> 404 </para>
404 405
406 <para>
407 <note>
408 The directive can be specified on the
409 <literal>server</literal> level
410 since <link doc="../njs/changes.xml" id="njs0.7.7">0.7.7</link>.
411 </note>
412 </para>
413
405 </directive> 414 </directive>
406 415
407 416
408 <directive name="js_include"> 417 <directive name="js_include">
409 <syntax><value>file</value></syntax> 418 <syntax><value>file</value></syntax>
442 <directive name="js_path"> 451 <directive name="js_path">
443 <syntax> 452 <syntax>
444 <value>path</value></syntax> 453 <value>path</value></syntax>
445 <default/> 454 <default/>
446 <context>stream</context> 455 <context>stream</context>
456 <context>server</context>
447 <appeared-in>0.3.0</appeared-in> 457 <appeared-in>0.3.0</appeared-in>
448 458
449 <para> 459 <para>
450 Sets an additional path for njs modules. 460 Sets an additional path for njs modules.
461 </para>
462
463 <para>
464 <note>
465 The directive can be specified on the
466 <literal>server</literal> level
467 since <link doc="../njs/changes.xml" id="njs0.7.7">0.7.7</link>.
468 </note>
451 </para> 469 </para>
452 470
453 </directive> 471 </directive>
454 472
455 473
525 <syntax> 543 <syntax>
526 <value>$variable</value> <value>function</value> | 544 <value>$variable</value> <value>function</value> |
527 <value>module.function</value></syntax> 545 <value>module.function</value></syntax>
528 <default/> 546 <default/>
529 <context>stream</context> 547 <context>stream</context>
548 <context>server</context>
530 549
531 <para> 550 <para>
532 Sets an njs <literal>function</literal> 551 Sets an njs <literal>function</literal>
533 for the specified <literal>variable</literal>. 552 for the specified <literal>variable</literal>.
534 Since <link doc="../njs/changes.xml" id="njs0.4.0">0.4.0</link>, 553 Since <link doc="../njs/changes.xml" id="njs0.4.0">0.4.0</link>,
561 <link doc="../njs/reference.xml" id="settimeout">setTimeout()</link> 580 <link doc="../njs/reference.xml" id="settimeout">setTimeout()</link>
562 are not supported. 581 are not supported.
563 </note> 582 </note>
564 </para> 583 </para>
565 584
585 <para>
586 <note>
587 The directive can be specified on the
588 <literal>server</literal> level
589 since <link doc="../njs/changes.xml" id="njs0.7.7">0.7.7</link>.
590 </note>
591 </para>
592
566 </directive> 593 </directive>
567 594
568 595
569 <directive name="js_var"> 596 <directive name="js_var">
570 <syntax><value>$variable</value> [<value>value</value>]</syntax> 597 <syntax><value>$variable</value> [<value>value</value>]</syntax>
571 <default/> 598 <default/>
572 <context>stream</context> 599 <context>stream</context>
600 <context>server</context>
573 <appeared-in>0.5.3</appeared-in> 601 <appeared-in>0.5.3</appeared-in>
574 602
575 <para> 603 <para>
576 Declares 604 Declares
577 a <link doc="../njs/reference.xml" id="r_variables">writable</link> 605 a <link doc="../njs/reference.xml" id="r_variables">writable</link>
578 variable. 606 variable.
579 The value can contain text, variables, and their combination. 607 The value can contain text, variables, and their combination.
580 </para> 608 </para>
581 609
610 <para>
611 <note>
612 The directive can be specified on the
613 <literal>server</literal> level
614 since <link doc="../njs/changes.xml" id="njs0.7.7">0.7.7</link>.
615 </note>
616 </para>
617
582 </directive> 618 </directive>
583 619
584 </section> 620 </section>
585 621
586 622