Mercurial > hg > nginx-site
comparison xml/en/docs/njs/reference.xml @ 2578:fafb7767c128
Restructured njs Reference.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Thu, 06 Aug 2020 17:38:21 +0100 |
parents | 3e47eecce384 |
children | 63cef7604e0d |
comparison
equal
deleted
inserted
replaced
2577:67fd664e2612 | 2578:fafb7767c128 |
---|---|
7 <!DOCTYPE article SYSTEM "../../../../dtd/article.dtd"> | 7 <!DOCTYPE article SYSTEM "../../../../dtd/article.dtd"> |
8 | 8 |
9 <article name="Reference" | 9 <article name="Reference" |
10 link="/en/docs/njs/reference.html" | 10 link="/en/docs/njs/reference.html" |
11 lang="en" | 11 lang="en" |
12 rev="48"> | 12 rev="49"> |
13 | 13 |
14 <section id="summary"> | 14 <section id="summary"> |
15 | 15 |
16 <para> | 16 <para> |
17 <link doc="index.xml">njs</link> provides objects, methods and properties | 17 <link doc="index.xml">njs</link> provides objects, methods and properties |
683 </para> | 683 </para> |
684 | 684 |
685 </section> | 685 </section> |
686 | 686 |
687 | 687 |
688 <section id="njs_api_timers" name="Timers"> | |
689 | |
690 <para> | |
691 | |
692 <list type="tag"> | |
693 | |
694 <tag-name id="cleartimeout"><literal>clearTimeout(<value>timeout</value>)</literal></tag-name> | |
695 <tag-desc> | |
696 Cancels a <literal>timeout</literal> object | |
697 created by <link id="settimeout">setTimeout()</link>. | |
698 </tag-desc> | |
699 | |
700 <tag-name id="settimeout"><literal>setTimeout(<value>function</value>, | |
701 <value>ms</value>[, <value>arg1</value>, <value>argN</value>])</literal></tag-name> | |
702 <tag-desc> | |
703 Calls a <literal>function</literal> | |
704 after a specified number of <literal>milliseconds</literal>. | |
705 One or more optional <literal>arguments</literal> | |
706 can be passed to the specified function. | |
707 Returns a <literal>timeout</literal> object. | |
708 <example> | |
709 function handler(v) | |
710 { | |
711 // ... | |
712 } | |
713 | |
714 t = setTimeout(handler, 12); | |
715 | |
716 // ... | |
717 | |
718 clearTimeout(t); | |
719 </example> | |
720 </tag-desc> | |
721 | |
722 </list> | |
723 </para> | |
724 | |
725 </section> | |
726 | |
727 </section> | |
728 | |
729 | |
730 <section id="built-in" name="Built-in Modules"> | |
731 | |
732 | |
688 <section id="crypto" name="Crypto"> | 733 <section id="crypto" name="Crypto"> |
689 | 734 |
690 <para> | 735 <para> |
691 The Crypto module provides cryptographic functionality support. | 736 The Crypto module provides cryptographic functionality support. |
692 The Crypto module object is returned by <literal>require('crypto')</literal>. | 737 The Crypto module object is returned by <literal>require('crypto')</literal>. |
790 'Oglm93xn23_MkiaEq_e9u8zk374' | 835 'Oglm93xn23_MkiaEq_e9u8zk374' |
791 </example> | 836 </example> |
792 </para> | 837 </para> |
793 | 838 |
794 </section> | 839 </section> |
795 | |
796 </section> | |
797 | |
798 <section id="njs_api_timers" name="Timers"> | |
799 | |
800 <para> | |
801 | |
802 <list type="tag"> | |
803 | |
804 <tag-name id="cleartimeout"><literal>clearTimeout(<value>timeout</value>)</literal></tag-name> | |
805 <tag-desc> | |
806 Cancels a <literal>timeout</literal> object | |
807 created by <link id="settimeout">setTimeout()</link>. | |
808 </tag-desc> | |
809 | |
810 <tag-name id="settimeout"><literal>setTimeout(<value>function</value>, | |
811 <value>ms</value>[, <value>arg1</value>, <value>argN</value>])</literal></tag-name> | |
812 <tag-desc> | |
813 Calls a <literal>function</literal> | |
814 after a specified number of <literal>milliseconds</literal>. | |
815 One or more optional <literal>arguments</literal> | |
816 can be passed to the specified function. | |
817 Returns a <literal>timeout</literal> object. | |
818 <example> | |
819 function handler(v) | |
820 { | |
821 // ... | |
822 } | |
823 | |
824 t = setTimeout(handler, 12); | |
825 | |
826 // ... | |
827 | |
828 clearTimeout(t); | |
829 </example> | |
830 </tag-desc> | |
831 | |
832 </list> | |
833 </para> | |
834 | 840 |
835 </section> | 841 </section> |
836 | 842 |
837 | 843 |
838 <section id="njs_api_fs" name="File System"> | 844 <section id="njs_api_fs" name="File System"> |