mirror of
https://github.com/openharmony/js_api_module.git
synced 2026-08-24 22:21:26 -04:00
438194fed4
On branch master Your branch is up to date with 'origin/master'.
44 lines
1.4 KiB
Plaintext
44 lines
1.4 KiB
Plaintext
|
|
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,
|
|
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;
|
|
} |