diff --git a/api/@ohos.web.d.ts b/api/@ohos.web.d.ts index 3d462d0bfa3321f2825f775988177889dc08cf3f..d67dd55aaa9a81eafba5f60af817c856132274b9 100644 --- a/api/@ohos.web.d.ts +++ b/api/@ohos.web.d.ts @@ -122,6 +122,52 @@ declare namespace web { */ static saveHttpAuthCredentials(host: string, realm: string, username: string, password: string): void; } + + /** + * Provides asynchronous methods for manage the NWeb. + * + * @since 9 + */ + class WebAsyncController { + /** + * Constructor. + * + * @param controller WebAsyncController needs a WebController to associate with corresponding nweb. + * + * @since 9 + */ + constructor(controller: WebController); + + /** + * Saves the current page as a web archive. + * + * @param baseName the filename where the archive should be placed,This value cannot be null. + * @param autoName if false, takes basename to be a file. If true, basename is assumed to be + * a directory in which a filename will be chosen according to the URL of the + * current page. + * @returns a promise resolved after the web archive has been saved. The parameter will either + * be the filename under which the file was saved, or empty if saving the file failed. + * + * @since 9 + */ + storeWebArchive(baseName: string, autoName: boolean): Promise; + + /** + * Saves the current page as a web archive. + * + * @param baseName the filename where the archive should be placed,This value cannot be null. + * @param autoName if false, takes basename to be a file. If true, basename is assumed to be + * a directory in which a filename will be chosen according to the URL of the + * current page. + * @param callback called after the web archive has been saved. The parameter will either be + * the filename under which the file was saved, or empty if saving + * the file failed. + * + * @since 9 + */ + storeWebArchive(baseName: string, autoName: boolean, callback : AsyncCallback): void; + } + } -export default web; \ No newline at end of file +export default web;