diff --git a/api/@internal/component/ets/web.d.ts b/api/@internal/component/ets/web.d.ts index a45cfc58a723b49660af68e3db47331d2921aa3b..636060804afc100460ddf6c304b25c40ff86ba69 100644 --- a/api/@internal/component/ets/web.d.ts +++ b/api/@internal/component/ets/web.d.ts @@ -1,21 +1,29 @@ declare class WebController { + /** + * Constructor. + * @since 8 + */ constructor(); + /** * Means to load a piece of code and execute JS code in the context of the currently displayed page * @since 8 */ evaluateJavaScript(jscode: string); + /** * Indicates that a piece of code is loaded * @since 8 */ loadDataWithBaseURL(value : {baseUrl: string, data: string, mimeType:string, encoding:string, historyUrl: string}); + /** * Load the given URL * @since 8 */ loadUrl(url : string); } + declare interface WebOptions { /** * Set the address of the web page to be displayed @@ -24,31 +32,40 @@ declare interface WebOptions { src: string | Resource; controller: WebController; } -interface Web extends WebAttribute { - (value: WebOptions): Web; + +interface WebInterface { + /** + * Set Value. + * @since 8 + */ + (value: WebOptions): WebAttribute; } -declare class WebAttribute extends CommonMethod { + +declare class WebAttribute extends CommonMethod { /** * Triggered at the end of web page loading * @since 8 */ - onPageFinish(callback: (event?:{ url: string }) => void): T; + onPageFinish(callback: (event?:{ url: string }) => void): WebAttribute; + /** * Get WebView focus callback event * @since 8 */ - onRequestFocus(event: () => void): T; + onRequestFocus(event: () => void): WebAttribute; + /** * Set whether WebView allows JavaScript scripts to execute * @since 8 */ - javaScriptEnabled(value: boolean): T; + javaScriptEnabled(value: boolean): WebAttribute; + /** * Enable or disable local file system access in WebView * @since 8 */ - fileAccessEnabled(value: boolean): T; + fileAccessEnabled(value: boolean): WebAttribute; } -declare class WebExtend extends WebAttribute { -} -declare const Web: Web; + +declare const Web: WebInterface; +declare const WebInstance: WebAttribute;