提交 2a3b9795 编写于 作者: W wusongqing

update docs against 6841

Signed-off-by: Nwusongqing <wusongqing@huawei.com>
上级 0b94732a
# Obtaining Process Information
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
> **NOTE**
>
> The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.
......@@ -409,7 +410,7 @@ This is a system API and cannot be called by third-party applications.
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| timeout | number | No| Maximum running time (in ms) of the child process. When the running time of the child process exceeds the value of this parameter, the parent process sends a **killSignal** to the child process to terminate it. The default value is **0**.|
| killSignal | number&nbsp;&nbsp;\|&nbsp;string | No| Signal sent to the child process when the running time of a child process exceeds the timeout period. The default value is **SIGTERM**.|
| killSignal | number \| string | No| Signal sent to the child process when the running time of a child process exceeds the timeout period. The default value is **SIGTERM**.|
| maxBuffer | number | No| Maximum buffer size for the standard input and output of the child process. When the size is exceeded, the child process will be terminated. The default value is **1024 \* 1024**.|
**Return value**
......
# URL String Parsing
> **NOTE**<br>
> **NOTE**
>
> The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.
......@@ -25,7 +26,7 @@ Creates a **URLSearchParams** instance.
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| init | string[][]&nbsp;\|&nbsp;Record&lt;string,&nbsp;string&gt;&nbsp;\|&nbsp;string&nbsp;\|&nbsp;URLSearchParams | No| Input parameter objects, which include the following:<br>- **string[][]**: two-dimensional string array<br>-&nbsp;**Record&lt;string,&nbsp;string&gt;**: list of objects<br>- **string**: string<br>- **URLSearchParams**: object |
| init | string[][]&nbsp;\|&nbsp;Record&lt;string,&nbsp;string&gt;&nbsp;\|&nbsp;string&nbsp;\|&nbsp;URLSearchParams | No| Input parameter objects, which include the following:<br>- **string[][]**: two-dimensional string array<br>- **Record&lt;string,&nbsp;string&gt;**: list of objects<br>- **string**: string<br>- **URLSearchParams**: object|
**Example**
......@@ -48,10 +49,10 @@ Appends a key-value pair into the query string.
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- |
| name | string | Yes | Key of the key-value pair to append. |
| value | string | Yes | Value of the key-value pair to append. |
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| name | string | Yes| Key of the key-value pair to append.|
| value | string | Yes| Value of the key-value pair to append.|
**Example**
......@@ -72,9 +73,9 @@ Deletes key-value pairs of the specified key.
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- |
| name | string | Yes | Key of the key-value pairs to delete. |
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| name | string | Yes| Key of the key-value pairs to delete.|
**Example**
......@@ -95,15 +96,15 @@ Obtains all the key-value pairs based on the specified key.
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- |
| name | string | Yes | Key specified to obtain all key-value pairs. |
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| name | string | Yes| Key specified to obtain all key-value pairs.|
**Return value**
| Type | Description |
| -------- | -------- |
| string[] | All key-value pairs matching the specified key. |
| Type| Description|
| -------- | -------- |
| string[] | All key-value pairs matching the specified key.|
**Example**
......@@ -125,9 +126,9 @@ Obtains an ES6 iterator. Each item of the iterator is a JavaScript array, and th
**Return value**
| Type | Description |
| -------- | -------- |
| IterableIterator&lt;[string,&nbsp;string]&gt; | ES6 iterator. |
| Type| Description|
| -------- | -------- |
| IterableIterator&lt;[string,&nbsp;string]&gt; | ES6 iterator.|
**Example**
......@@ -149,18 +150,18 @@ Traverses the key-value pairs in the **URLSearchParams** instance by using a cal
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- |
| callbackfn | function | Yes | Callback invoked to traverse the key-value pairs in the **URLSearchParams** instance. |
| thisArg | Object | No | Value to use when the callback is invoked. |
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| callbackfn | function | Yes| Callback invoked to traverse the key-value pairs in the **URLSearchParams** instance.|
| thisArg | Object | No| Value to use when the callback is invoked.|
**Table 1** callbackfn parameter description
| Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- |
| value | string | Yes | Value that is currently traversed. |
| key | string | Yes | Key that is currently traversed. |
| searchParams | Object | Yes | Instance that invokes the **forEach** method. |
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| value | string | Yes| Value that is currently traversed.|
| key | string | Yes| Key that is currently traversed.|
| searchParams | Object | Yes| Instance that invokes the **forEach** method.|
**Example**
......@@ -182,16 +183,16 @@ Obtains the value of the first key-value pair based on the specified key.
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- |
| name | string | Yes | Key specified to obtain the value. |
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| name | string | Yes| Key specified to obtain the value.|
**Return value**
| Type | Description |
| -------- | -------- |
| string | Returns the value of the first key-value pair if obtained. |
| null | Returns null if no value is obtained. |
| Type| Description|
| -------- | -------- |
| string | Returns the value of the first key-value pair if obtained.|
| null | Returns null if no value is obtained.|
**Example**
......@@ -212,15 +213,15 @@ Checks whether a key has a value.
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- |
| name | string | Yes | Key specified to search for its value. |
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| name | string | Yes| Key specified to search for its value.|
**Return value**
| Type | Description |
| -------- | -------- |
| boolean | Returns **true** if the value exists; returns **false** otherwise. |
| Type| Description|
| -------- | -------- |
| boolean | Returns **true** if the value exists; returns **false** otherwise.|
**Example**
......@@ -241,10 +242,10 @@ Sets the value for a key. If key-value pairs matching the specified key exist, t
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- |
| name | string | Yes | Key of the value to set. |
| value | string | Yes | Value to set. |
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| name | string | Yes| Key of the value to set.|
| value | string | Yes| Value to set.|
**Example**
......@@ -282,9 +283,9 @@ Obtains an ES6 iterator that contains the keys of all the key-value pairs.
**Return value**
| Type | Description |
| -------- | -------- |
| IterableIterator&lt;string&gt; | ES6 iterator that contains the keys of all the key-value pairs. |
| Type| Description|
| -------- | -------- |
| IterableIterator&lt;string&gt; | ES6 iterator that contains the keys of all the key-value pairs.|
**Example**
......@@ -306,9 +307,9 @@ Obtains an ES6 iterator that contains the values of all the key-value pairs.
**Return value**
| Type | Description |
| -------- | -------- |
| IterableIterator&lt;string&gt; | ES6 iterator that contains the values of all the key-value pairs. |
| Type| Description|
| -------- | -------- |
| IterableIterator&lt;string&gt; | ES6 iterator that contains the values of all the key-value pairs.|
**Example**
......@@ -330,9 +331,9 @@ Obtains an ES6 iterator. Each item of the iterator is a JavaScript array, and th
**Return value**
| Type | Description |
| -------- | -------- |
| IterableIterator&lt;[string,&nbsp;string]&gt; | ES6 iterator. |
| Type| Description|
| -------- | -------- |
| IterableIterator&lt;[string,&nbsp;string]&gt; | ES6 iterator.|
**Example**
......@@ -354,9 +355,9 @@ Obtains search parameters that are serialized as a string and, if necessary, per
**Return value**
| Type | Description |
| -------- | -------- |
| string | String of serialized search parameters, which is percent-encoded if necessary. |
| Type| Description|
| -------- | -------- |
| string | String of serialized search parameters, which is percent-encoded if necessary.|
**Example**
......@@ -400,10 +401,10 @@ Creates a URL.
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- |
| url | string | Yes | Input object. |
| base | string&nbsp;\ |&nbsp;URL | No | Input parameter, which can be any of the following:<br>- **string**: string<br>- **URL**: string or object |
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| url | string | Yes| Input object.|
| base | string&nbsp;\|&nbsp;URL | No| Input parameter, which can be any of the following:<br>- **string**: string<br>- **URL**: string or object|
**Example**
......@@ -433,9 +434,9 @@ Converts the parsed URL into a string.
**Return value**
| Type | Description |
| -------- | -------- |
| string | Website address in a serialized string. |
| Type| Description|
| -------- | -------- |
| string | Website address in a serialized string.|
**Example**
......@@ -455,12 +456,12 @@ Converts the parsed URL into a JSON string.
**Return value**
| Type | Description |
| -------- | -------- |
| string | Website address in a serialized string. |
| Type| Description|
| -------- | -------- |
| string | Website address in a serialized string.|
**Example**
```js
const url = new Url.URL('http://username:password@host:8080/directory/file?query=pppppp#qwer=da');
url.toJSON()
```
\ No newline at end of file
```
# XML Parsing and Generation
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**<br>
> **NOTE**
>
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册