harmony(鸿蒙)Web子系统JS API变更

2022-08-09 浏览 (932)

Web子系统JS API变更

OpenHarmony 3.2 Beta2版本相较于OpenHarmony 3.2 Beta1版本,Web子系统的API变更如下:

接口变更

模块名类名函数变更类型
ohos.webWebDataBasestatic saveHttpAuthCredentials(host: string, realm: string, username: string, password: string): void;新增
ohos.webWebDataBasestatic getHttpAuthCredentials(host: string, realm: string): Array<string>;新增
ohos.webWebDataBasestatic deleteHttpAuthCredentials(): void;新增
ohos.webWebDataBasestatic existHttpAuthCredentials(): boolean;新增
ohos.webWebStoragestatic getOriginUsage(origin: string): Promise<number> ;
static getOriginUsage(origin: string, callback: AsyncCallback<number>): void;
新增
ohos.webWebStoragestatic getOriginQuota(origin: string): Promise<number>;
static getOriginQuota(origin: string, callback: AsyncCallback<number>): void;
新增
ohos.webWebStoragestatic getOrigins(): Promise<Array<WebStorageOrigin>>;
static getOrigins(callback: AsyncCallback<Array<WebStorageOrigin>>): void;
新增
ohos.webWebStoragestatic deleteOrigin(origin: string): void;新增
ohos.webWebStoragestatic deleteAllData(): void;新增
ohos.webWebStorageOriginquota: number;新增
ohos.webWebStorageOriginusage: number;新增
ohos.webWebStorageOriginorigin: string;新增
WebWebAttributeonInterceptRequest(callback: (event?: { request: WebResourceRequest}) => WebResourceResponse): WebAttribute;新增
WebWebAttributeonHttpAuthRequest(callback: (event?: { handler: HttpAuthHandler, host: string, realm: string }) => boolean): WebAttribute;新增
WebWebAttributeonScaleChange(callback: (event: {oldScale: number, newScale: number}) => void): WebAttribute;新增
WebWebAttributeonResourceLoad(callback: (event: {url: string}) => void): WebAttribute;新增
WebWebAttributeonPrompt(callback: (event?: {url: string, message: string, value: string, result: JsResult }) => boolean): WebAttribute;新增
WebWebAttributeinitialScale(percent: number): WebAttribute;新增
WebWebControllerbackOrForward(step: number): void;新增
WebWebControllergetPageHeight(): number;新增
WebWebControllergetTitle(): string;新增
WebWebControllergetDefaultUserAgent(): string;新增
WebWebControllergetWebId(): number;新增
WebWebControllergetHitTestValue(): HitTestValue;新增
WebWebControllerzoomOut(): boolean;新增
WebWebControllerzoomIn(): boolean;新增
WebWebResourceResponsesetResponseCode(code: number);新增
WebWebResourceResponsesetResponseHeader(header: Array<Header>);新增
WebWebResourceResponsesetReasonMessage(reason: string);新增
WebWebResourceResponsesetResponseMimeType(mimeType: string);新增
WebWebResourceResponsesetResponseEncoding(encoding: string);新增
WebWebResourceResponsesetResponseData(data: string);新增

你可能感兴趣的鸿蒙文章

harmony(鸿蒙)OpenHarmony启用应用沙箱机制-适配指导

harmony(鸿蒙)3.2 beta2相对3.2 beta1变更详细说明

harmony(鸿蒙)元能力子系统JS API变更

harmony(鸿蒙)无障碍子系统JS API变更

harmony(鸿蒙)帐号子系统JS API变更

harmony(鸿蒙)ArkUI子系统JS API变更

harmony(鸿蒙)包管理子系统JS API变更

harmony(鸿蒙)基础通信子系统JS API变更

harmony(鸿蒙)公共基础库子系统JS API变更

harmony(鸿蒙)DFX子系统JS API变更

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/c8d6a066dd0340d58e4486cb8a821ce9