Files
js_api_module/mozilla_docs.txt
T
lifansheng 438194fed4 Signed-off-by: lifansheng <lifansheng1@huawei.com>
On branch master
 Your branch is up to date with 'origin/master'.
2021-12-03 14:37:39 +08:00

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;
}