diff --git a/api/@internal/component/ets/web.d.ts b/api/@internal/component/ets/web.d.ts index df369ecb1735993b492d5da3eb1594aec6cb88e1..fd14c1241ff66a0581b3f4c5ccf333fb18ef44de 100644 --- a/api/@internal/component/ets/web.d.ts +++ b/api/@internal/component/ets/web.d.ts @@ -2211,6 +2211,22 @@ declare class WebAttribute extends CommonMethod { */ blockNetwork(block: boolean): WebAttribute; + /** + * Set whether paint horizontal scroll bar. + * @param horizontalScrollBar True if it needs to paint horizontal scroll bar. + * + * @since 9 + */ + horizontalScrollBarAccess(horizontalScrollBar: boolean): WebAttribute; + + /** + * Set whether paint vertical scroll bar. + * @param verticalScrollBar True if it needs to paint vertical scroll bar. + * + * @since 9 + */ + verticalScrollBarAccess(verticalScrollBar: boolean): WebAttribute; + /** * Triggered when the application receive the url of an apple-touch-icon. * @param callback The triggered callback when the application receive an new url of an diff --git a/api/@ohos.web.webview.d.ts b/api/@ohos.web.webview.d.ts index fdc5d77fd533e8f75158cf39f56150c0638286b7..4cfa67ad90a17d456b5e0ea8cd4fca0c459fc963 100644 --- a/api/@ohos.web.webview.d.ts +++ b/api/@ohos.web.webview.d.ts @@ -1073,6 +1073,45 @@ declare namespace webview { * @since 9 */ removeCache(clearRom: boolean): void; + + /** + * Scroll to the position. + * + * @param { boolean } x - the x of the position. + * @param { boolean } y - the y of the position. + * @throws { BusinessError } 401 - Invalid input parameter. + * @throws { BusinessError } 17100001 - Init error. + * The WebviewController must be associated with a Web component. + * + * @since 9 + */ + scrollTo(x:number, y:number): void; + + /** + * Scroll by the delta position. + * + * @param { boolean } deltaX - the delta x of the position. + * @param { boolean } deltaY - the delta y of the position. + * @throws { BusinessError } 401 - Invalid input parameter. + * @throws { BusinessError } 17100001 - Init error. + * The WebviewController must be associated with a Web component. + * + * @since 9 + */ + scrollBy(deltaX:number, deltaY:number): void; + + /** + * Slide by the speed. + * + * @param { boolean } vx - the x speed of the speed. + * @param { boolean } vy - the y speed of the speed. + * @throws { BusinessError } 401 - Invalid input parameter. + * @throws { BusinessError } 17100001 - Init error. + * The WebviewController must be associated with a Web component. + * + * @since 9 + */ + slideScroll(vx:number, vy:number): void; } }