mirror of
https://github.com/openharmony/js_api_module.git
synced 2026-07-20 22:07:00 -04:00
847674097b
Modify code of api https://gitee.com/openharmony/js_api_module/issues/I4WO30 Signed-off-by: shikai-123 <shikai25@huawei.com>
58 lines
2.0 KiB
Plaintext
58 lines
2.0 KiB
Plaintext
/*
|
|
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the 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 mozilla license,
|
|
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
|
|
|
|
class URLSearchParams {
|
|
|
|
constructor(init?: string[][] | Record<string, string> | string | URLSearchParams);
|
|
append(name: string, value: string): void;
|
|
delete(name: string): void;
|
|
getAll(name: string): string[];
|
|
entries(): IterableIterator<[string, string]>;
|
|
forEach(callbackfn: (value: string, key: string, searchParams: this) => void): void;
|
|
get(name: string): string | null;
|
|
has(name: string): boolean;
|
|
set(name: string, value: string): void;
|
|
sort(): void;
|
|
keys(): IterableIterator<string>;
|
|
values(): IterableIterator<string>;
|
|
[Symbol.iterator](): IterableIterator<[string, string]>;
|
|
toString(): string;
|
|
}
|
|
|
|
class URL {
|
|
|
|
constructor(url: string, base?: string | URL);
|
|
toString(): string;
|
|
toJSON(): string;
|
|
hash: string;
|
|
host: string;
|
|
hostname: string;
|
|
href: string;
|
|
readonly origin: string;
|
|
password: string;
|
|
pathname: string;
|
|
port: string;
|
|
protocol: string;
|
|
search: string;
|
|
readonly searchParams: URLSearchParams;
|
|
username: string;
|
|
} |