mirror of
https://gitee.com/openharmony/js_api_module
synced 2024-11-27 14:40:51 +00:00
Modify review message
Modify code of api https://gitee.com/openharmony/js_api_module/issues/I4WO30 Signed-off-by: shikai-123 <shikai25@huawei.com>
This commit is contained in:
parent
cd53cfd6c7
commit
7c93fcd505
@ -210,7 +210,7 @@ console.log(params.toString());
|
|||||||
```
|
```
|
||||||
8、has(name: string): boolean
|
8、has(name: string): boolean
|
||||||
```
|
```
|
||||||
console.log(params.has('bar')); // =>ture
|
console.log(params.has('bar')); // =>true
|
||||||
```
|
```
|
||||||
9、set(name: string, value string): void
|
9、set(name: string, value string): void
|
||||||
```
|
```
|
||||||
@ -274,7 +274,7 @@ for (const [name, value] of params) {
|
|||||||
}
|
}
|
||||||
// Prints:
|
// Prints:
|
||||||
// foo bar
|
// foo bar
|
||||||
// xyz ba
|
// xyz bar
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
@ -454,9 +454,7 @@ var options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunc
|
|||||||
that.parse(options);
|
that.parse(options);
|
||||||
```
|
```
|
||||||
## Related warehouse
|
## Related warehouse
|
||||||
[js_api_module Subsystem](https://gitee.com/OHOS_STD/js_api_module)
|
[js_api_module Subsystem](base/compileruntime/js_api_module-readme.md)
|
||||||
|
|
||||||
[base/compileruntime/js_api_module/](base/compileruntime/js_api_module-readme.md)
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
20
README_zh.md
20
README_zh.md
@ -106,7 +106,7 @@ base/compileruntime/js_api_module/
|
|||||||
| new URLSearchParams(string) | URLSearchParams(string) 构造器的入参为string数据类型,该方法创建并返回一个新的URLSearchParams 对象。 开头的'?' 字符会被忽略。 |
|
| new URLSearchParams(string) | URLSearchParams(string) 构造器的入参为string数据类型,该方法创建并返回一个新的URLSearchParams 对象。 开头的'?' 字符会被忽略。 |
|
||||||
| new URLSearchParams(obj) | URLSearchParams(obj) 构造器的入参为obj数据类型,该方法创建并返回一个新的URLSearchParams 对象。 开头的'?' 字符会被忽略。 |
|
| new URLSearchParams(obj) | URLSearchParams(obj) 构造器的入参为obj数据类型,该方法创建并返回一个新的URLSearchParams 对象。 开头的'?' 字符会被忽略。 |
|
||||||
| new URLSearchParams(iterable) | URLSearchParams(iterable) 构造器的入参为iterable数据类型,该方法创建并返回一个新的URLSearchParams 对象。 开头的'?' 字符会被忽略。 |
|
| new URLSearchParams(iterable) | URLSearchParams(iterable) 构造器的入参为iterable数据类型,该方法创建并返回一个新的URLSearchParams 对象。 开头的'?' 字符会被忽略。 |
|
||||||
| has(name: string): boolean | 检索searchParams对象中是否含有name。有则返回ture,否则返回false。 |
|
| has(name: string): boolean | 检索searchParams对象中是否含有name。有则返回true,否则返回false。 |
|
||||||
| set(name: string, value string): void | 检索searchParams对象中是否含有key为name的键值对。没有的话则添加该键值对,有的话则修改对象中第一个key所对应的value,并删除键为name的其余键值对。 |
|
| set(name: string, value string): void | 检索searchParams对象中是否含有key为name的键值对。没有的话则添加该键值对,有的话则修改对象中第一个key所对应的value,并删除键为name的其余键值对。 |
|
||||||
| sort(): void | 根据键的Unicode代码点,对包含在此对象中的所有键/值对进行排序,并返回undefined。 |
|
| sort(): void | 根据键的Unicode代码点,对包含在此对象中的所有键/值对进行排序,并返回undefined。 |
|
||||||
| toString(): string | 根据searchParams对象,返回适用在URL中的查询字符串。 |
|
| toString(): string | 根据searchParams对象,返回适用在URL中的查询字符串。 |
|
||||||
@ -209,7 +209,7 @@ console.log(params.toString());
|
|||||||
```
|
```
|
||||||
8、has(name: string): boolean
|
8、has(name: string): boolean
|
||||||
```
|
```
|
||||||
console.log(params.has('bar')); // =>ture
|
console.log(params.has('bar')); // =>true
|
||||||
```
|
```
|
||||||
9、set(name: string, value string): void
|
9、set(name: string, value string): void
|
||||||
```
|
```
|
||||||
@ -273,7 +273,7 @@ for (const [name, value] of params) {
|
|||||||
}
|
}
|
||||||
// Prints:
|
// Prints:
|
||||||
// foo bar
|
// foo bar
|
||||||
// xyz ba
|
// xyz bar
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
@ -413,8 +413,8 @@ var strXml =
|
|||||||
'<?xml version="1.0" encoding="utf-8"?>' +
|
'<?xml version="1.0" encoding="utf-8"?>' +
|
||||||
'<note importance="high" logged="true">' +
|
'<note importance="high" logged="true">' +
|
||||||
' <title>Happy</title>' +
|
' <title>Happy</title>' +
|
||||||
' <todo>Work</todo>' +
|
' <title>Work</title>' +
|
||||||
' <todo>Play</todo>' +
|
' <title>Play</title>' +
|
||||||
'</note>';
|
'</note>';
|
||||||
var arrayBuffer = new ArrayBuffer(strXml.length*2);
|
var arrayBuffer = new ArrayBuffer(strXml.length*2);
|
||||||
var bufView = new Uint8Array(arrayBuffer);
|
var bufView = new Uint8Array(arrayBuffer);
|
||||||
@ -431,8 +431,8 @@ var strXml =
|
|||||||
'<?xml version="1.0" encoding="utf-8"?>' +
|
'<?xml version="1.0" encoding="utf-8"?>' +
|
||||||
'<note importance="high" logged="true">' +
|
'<note importance="high" logged="true">' +
|
||||||
' <title>Happy</title>' +
|
' <title>Happy</title>' +
|
||||||
' <todo>Work</todo>' +
|
' <title>Work</title>' +
|
||||||
' <todo>Play</todo>' +
|
' <title>Play</title>' +
|
||||||
'</note>';
|
'</note>';
|
||||||
var arrayBuffer = new ArrayBuffer(strXml.length*2);
|
var arrayBuffer = new ArrayBuffer(strXml.length*2);
|
||||||
var bufView = new Uint8Array(arrayBuffer);
|
var bufView = new Uint8Array(arrayBuffer);
|
||||||
@ -451,11 +451,9 @@ function func(key, value){
|
|||||||
}
|
}
|
||||||
var options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func}
|
var options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func}
|
||||||
that.parse(options);
|
that.parse(options);
|
||||||
|
```
|
||||||
## 相关仓
|
## 相关仓
|
||||||
[js_api_module子系统](https://gitee.com/OHOS_STD/js_api_module)
|
[js_api_module子系统](base/compileruntime/js_api_module/readme.md)
|
||||||
|
|
||||||
[base/compileruntime/js_api_module/](base/compileruntime/js_api_module/readme.md)
|
|
||||||
|
|
||||||
### 许可证
|
### 许可证
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
# Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
# You may obtain a copy of the License at
|
# You may obtain a copy of the License at
|
||||||
@ -12,13 +12,13 @@
|
|||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import platform
|
import platform
|
||||||
import argparse
|
import argparse
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
|
|
||||||
def run_command(in_cmd):
|
def run_command(in_cmd):
|
||||||
print(" ".join(in_cmd))
|
print(" ".join(in_cmd))
|
||||||
proc = subprocess.Popen(in_cmd, stdout=subprocess.PIPE,
|
proc = subprocess.Popen(in_cmd, stdout=subprocess.PIPE,
|
||||||
@ -30,8 +30,6 @@ def run_command(in_cmd):
|
|||||||
raise Exception(stdout)
|
raise Exception(stdout)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
||||||
|
|
||||||
PARSER_INST = argparse.ArgumentParser()
|
PARSER_INST = argparse.ArgumentParser()
|
||||||
PARSER_INST.add_argument('--dst-file',
|
PARSER_INST.add_argument('--dst-file',
|
||||||
help='the converted target file')
|
help='the converted target file')
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
# Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
# You may obtain a copy of the License at
|
# You may obtain a copy of the License at
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
@ -12,6 +12,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "js_convertxml.h"
|
#include "js_convertxml.h"
|
||||||
#include "securec.h"
|
#include "securec.h"
|
||||||
#include "utils/log.h"
|
#include "utils/log.h"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
@ -12,6 +12,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef FOUNDATION_ACE_CCRUNTIME_CONVERT_XML_CLASS_H
|
#ifndef FOUNDATION_ACE_CCRUNTIME_CONVERT_XML_CLASS_H
|
||||||
#define FOUNDATION_ACE_CCRUNTIME_CONVERT_XML_CLASS_H
|
#define FOUNDATION_ACE_CCRUNTIME_CONVERT_XML_CLASS_H
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
"target": "es6",
|
"target": "es6",
|
||||||
"module": "es6",
|
"module": "es6",
|
||||||
"rootDir": "./src",
|
"rootDir": "./src",
|
||||||
//"outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */
|
|
||||||
"outDir": "./out", /* Specify an output folder for all emitted files. */
|
"outDir": "./out", /* Specify an output folder for all emitted files. */
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
The definitions of some interfaces implemented in jsapi/api/js_url.cpp are released under Mozilla license.
|
The definitions of some interfaces implemented in jsapi/api/js_url.cpp are released under Mozilla license.
|
||||||
|
|
||||||
The definitions and functions of these interfaces are consistent with the standard interfaces under mozila license,
|
The definitions and functions of these interfaces are consistent with the standard interfaces under mozilla license,
|
||||||
but the implementation of specific functions is independent and self-developed.
|
but the implementation of specific functions is independent and self-developed.
|
||||||
|
|
||||||
All interfaces are described in d.ts, the following is the interface written in d.ts under to Mozilla license
|
All interfaces are described in d.ts, the following is the interface written in d.ts under to Mozilla license
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
# Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
# You may obtain a copy of the License at
|
# You may obtain a copy of the License at
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
# Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
# You may obtain a copy of the License at
|
# You may obtain a copy of the License at
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
# Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
# You may obtain a copy of the License at
|
# You may obtain a copy of the License at
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
@ -12,6 +12,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "js_uri.h"
|
#include "js_uri.h"
|
||||||
#include "utils/log.h"
|
#include "utils/log.h"
|
||||||
namespace OHOS::Uri {
|
namespace OHOS::Uri {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
@ -13,7 +13,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "js_uri.h"
|
#include "js_uri.h"
|
||||||
#include "securec.h"
|
#include "securec.h"
|
||||||
#include "utils/log.h"
|
#include "utils/log.h"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
@ -12,6 +12,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare function requireInternal(s : string) : any;
|
declare function requireInternal(s : string) : any;
|
||||||
const uri = requireInternal("uri");
|
const uri = requireInternal("uri");
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
"target": "es6",
|
"target": "es6",
|
||||||
"module": "es6",
|
"module": "es6",
|
||||||
"rootDir": "./src",
|
"rootDir": "./src",
|
||||||
//"outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */
|
|
||||||
"outDir": "./out", /* Specify an output folder for all emitted files. */
|
"outDir": "./out", /* Specify an output folder for all emitted files. */
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
# Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
# You may obtain a copy of the License at
|
# You may obtain a copy of the License at
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
@ -12,6 +12,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "js_url.h"
|
#include "js_url.h"
|
||||||
#include <regex>
|
#include <regex>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
@ -12,6 +12,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef COMPILERUNTIME_JS_API_URL_H
|
#ifndef COMPILERUNTIME_JS_API_URL_H
|
||||||
#define COMPILERUNTIME_JS_API_URL_H
|
#define COMPILERUNTIME_JS_API_URL_H
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
"target": "es6",
|
"target": "es6",
|
||||||
"module": "es6",
|
"module": "es6",
|
||||||
"rootDir": "./src",
|
"rootDir": "./src",
|
||||||
//"outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */
|
|
||||||
"outDir": "./out", /* Specify an output folder for all emitted files. */
|
"outDir": "./out", /* Specify an output folder for all emitted files. */
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
# Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
# You may obtain a copy of the License at
|
# You may obtain a copy of the License at
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
@ -396,14 +396,14 @@ namespace OHOS::xml {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool XmlPullParser::DealLength(size_t minimun)
|
bool XmlPullParser::DealLength(size_t minimum)
|
||||||
{
|
{
|
||||||
while (srcLinkList_->next != nullptr) {
|
while (srcLinkList_->next != nullptr) {
|
||||||
if (position_ < max_) {
|
if (position_ < max_) {
|
||||||
xmlPullParserError_ = "Unbalanced entity!";
|
xmlPullParserError_ = "Unbalanced entity!";
|
||||||
}
|
}
|
||||||
PopSrcLinkList();
|
PopSrcLinkList();
|
||||||
if (max_ - position_ >= minimun) {
|
if (max_ - position_ >= minimum) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -432,7 +432,7 @@ namespace OHOS::xml {
|
|||||||
}
|
}
|
||||||
if (strXml_.size() - max_ > 0 && position_ == 0) {
|
if (strXml_.size() - max_ > 0 && position_ == 0) {
|
||||||
max_ += strXml_.size() - max_;
|
max_ += strXml_.size() - max_;
|
||||||
if (max_ >= minimun) {
|
if (max_ >= minimum) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
@ -12,6 +12,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef FOUNDATION_ACE_CCRUNTIME_XML_CLASS_H
|
#ifndef FOUNDATION_ACE_CCRUNTIME_XML_CLASS_H
|
||||||
#define FOUNDATION_ACE_CCRUNTIME_XML_CLASS_H
|
#define FOUNDATION_ACE_CCRUNTIME_XML_CLASS_H
|
||||||
|
|
||||||
@ -164,7 +165,7 @@ namespace OHOS::xml {
|
|||||||
bool IsWhitespace() const;
|
bool IsWhitespace() const;
|
||||||
void PushSrcLinkList(std::string strBuffer);
|
void PushSrcLinkList(std::string strBuffer);
|
||||||
void PopSrcLinkList();
|
void PopSrcLinkList();
|
||||||
bool DealLength(size_t minimun);
|
bool DealLength(size_t minimum);
|
||||||
void Replace(std::string &strTemp, std::string strSrc, std::string strDes) const;
|
void Replace(std::string &strTemp, std::string strSrc, std::string strDes) const;
|
||||||
size_t GetNSCount(size_t iTemp);
|
size_t GetNSCount(size_t iTemp);
|
||||||
void Parse(napi_value thisVar);
|
void Parse(napi_value thisVar);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
"target": "es6",
|
"target": "es6",
|
||||||
"module": "es6",
|
"module": "es6",
|
||||||
"rootDir": "./src",
|
"rootDir": "./src",
|
||||||
//"outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */
|
|
||||||
"outDir": "./out", /* Specify an output folder for all emitted files. */
|
"outDir": "./out", /* Specify an output folder for all emitted files. */
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
|
Loading…
Reference in New Issue
Block a user