diff --git a/api/@internal/component/ets/web.d.ts b/api/@internal/component/ets/web.d.ts index 636060804afc100460ddf6c304b25c40ff86ba69..c30afa2937b09b71b52eee10916a28dc45bf69f5 100644 --- a/api/@internal/component/ets/web.d.ts +++ b/api/@internal/component/ets/web.d.ts @@ -9,19 +9,19 @@ declare class WebController { * Means to load a piece of code and execute JS code in the context of the currently displayed page * @since 8 */ - evaluateJavaScript(jscode: string); + runJavaScript(jscode: string); /** * Indicates that a piece of code is loaded * @since 8 */ - loadDataWithBaseURL(value : {baseUrl: string, data: string, mimeType:string, encoding:string, historyUrl: string}); + loadData(value: { baseUrl: string, data: string, mimeType: string, encoding: string, historyUrl: string }); /** * Load the given URL * @since 8 */ - loadUrl(url : string); + loadUrl(url: string); } declare interface WebOptions { @@ -43,28 +43,28 @@ interface WebInterface { declare class WebAttribute extends CommonMethod { /** - * Triggered at the end of web page loading + * Set whether WebView allows JavaScript scripts to execute * @since 8 */ - onPageFinish(callback: (event?:{ url: string }) => void): WebAttribute; + javaScriptAccess(javaScriptAccess: boolean): WebAttribute; /** - * Get WebView focus callback event + * Enable or disable local file system access in WebView * @since 8 */ - onRequestFocus(event: () => void): WebAttribute; + fileAccess(fileAccess: boolean): WebAttribute; /** - * Set whether WebView allows JavaScript scripts to execute + * Triggered at the end of web page loading * @since 8 */ - javaScriptEnabled(value: boolean): WebAttribute; + onPageEnd(callback: (event?: { url: string }) => void): WebAttribute; /** - * Enable or disable local file system access in WebView + * Get WebView focus callback event * @since 8 */ - fileAccessEnabled(value: boolean): WebAttribute; + onRequestSelected(event: () => void): WebAttribute; } declare const Web: WebInterface;