14d6c458bSopenharmony_ci/* 24d6c458bSopenharmony_ci * Copyright (c) 2022 Huawei Device Co., Ltd. 34d6c458bSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 44d6c458bSopenharmony_ci * you may not use this file except in compliance with the License. 54d6c458bSopenharmony_ci * You may obtain a copy of the License at 64d6c458bSopenharmony_ci * 74d6c458bSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 84d6c458bSopenharmony_ci * 94d6c458bSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 104d6c458bSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 114d6c458bSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 124d6c458bSopenharmony_ci * See the License for the specific language governing permissions and 134d6c458bSopenharmony_ci * limitations under the License. 144d6c458bSopenharmony_ci */ 154d6c458bSopenharmony_ci 164d6c458bSopenharmony_ciThe definitions of some interfaces implemented in jsapi/api/js_url.cpp are released under Mozilla license. 174d6c458bSopenharmony_ci 184d6c458bSopenharmony_ciThe definitions and functions of these interfaces are consistent with the standard interfaces under mozilla license, 194d6c458bSopenharmony_cibut the implementation of specific functions is independent and self-developed. 204d6c458bSopenharmony_ci 214d6c458bSopenharmony_ciAll interfaces are described in d.ts, the following is the interface written in d.ts under to Mozilla license 224d6c458bSopenharmony_ci 234d6c458bSopenharmony_ciclass URLSearchParams { 244d6c458bSopenharmony_ci 254d6c458bSopenharmony_ci constructor(init?: string[][] | Record<string, string> | string | URLSearchParams); 264d6c458bSopenharmony_ci append(name: string, value: string): void; 274d6c458bSopenharmony_ci delete(name: string): void; 284d6c458bSopenharmony_ci getAll(name: string): string[]; 294d6c458bSopenharmony_ci entries(): IterableIterator<[string, string]>; 304d6c458bSopenharmony_ci forEach(callbackfn: (value: string, key: string, searchParams: this) => void): void; 314d6c458bSopenharmony_ci get(name: string): string | null; 324d6c458bSopenharmony_ci has(name: string): boolean; 334d6c458bSopenharmony_ci set(name: string, value: string): void; 344d6c458bSopenharmony_ci sort(): void; 354d6c458bSopenharmony_ci keys(): IterableIterator<string>; 364d6c458bSopenharmony_ci values(): IterableIterator<string>; 374d6c458bSopenharmony_ci [Symbol.iterator](): IterableIterator<[string, string]>; 384d6c458bSopenharmony_ci toString(): string; 394d6c458bSopenharmony_ci} 404d6c458bSopenharmony_ci 414d6c458bSopenharmony_ciclass URL { 424d6c458bSopenharmony_ci 434d6c458bSopenharmony_ci constructor(url: string, base?: string | URL); 444d6c458bSopenharmony_ci toString(): string; 454d6c458bSopenharmony_ci toJSON(): string; 464d6c458bSopenharmony_ci hash: string; 474d6c458bSopenharmony_ci host: string; 484d6c458bSopenharmony_ci hostname: string; 494d6c458bSopenharmony_ci href: string; 504d6c458bSopenharmony_ci readonly origin: string; 514d6c458bSopenharmony_ci password: string; 524d6c458bSopenharmony_ci pathname: string; 534d6c458bSopenharmony_ci port: string; 544d6c458bSopenharmony_ci protocol: string; 554d6c458bSopenharmony_ci search: string; 564d6c458bSopenharmony_ci readonly searchParams: URLSearchParams; 574d6c458bSopenharmony_ci username: string; 584d6c458bSopenharmony_ci}