已合并
setLazyInitializeWebEngine #28459
liuzhijie2创建于 2025年11月15日
setLazyInitializeWebEngine #28459
已合并
liuzhijie2创建于 2025年11月15日
共 2 个文件变更+28-0
@@ -2106,6 +2106,7 @@ declare namespace webview {
2106 * @atomicservice2106 * @atomicservice
2107 * @since 112107 * @since 11
2108 */2108 */
2109+ 
2109 /**2110 /**
2110 * Delete the session cookies Asynchronously.2111 * Delete the session cookies Asynchronously.
2111 * @param { AsyncCallback<void> } callback - Called after the cookies have been deleted.2112 * @param { AsyncCallback<void> } callback - Called after the cookies have been deleted.
@@ -2117,6 +2118,19 @@ declare namespace webview {
2117 * @since 18 dynamic2118 * @since 18 dynamic
2118 */2119 */
2119 static clearSessionCookie(callback: AsyncCallback<void>): void;2120 static clearSessionCookie(callback: AsyncCallback<void>): void;
2121+ 
2122+ /**
2123+ * Delays the initialization of the web engine. By default, the web engine is initialized when the CookieManager
2124+ * interface is called. By setting the 'lazy' parameter to true, the web engine will not be initialized when the
2125+ * CookieManager interface is called. Instead, the web engine will be initialized either when the web component is
2126+ * created or when initializeWebEngine is called.
2127+ *
2128+ * @param { boolean } lazy - Controls whether to delay the initialization of the web engine.
2129+ * @static
2130+ * @syscap SystemCapability.Web.Webview.Core
2131+ * @since 23 dynamic
2132+ */
2133+ static setLazyInitializeWebEngine(lazy: boolean): void;
2120 }2134 }
2121 2135 
2122 /**2136 /**
@@ -1202,6 +1202,20 @@ declare namespace webview {
1202 * @since 22 static1202 * @since 22 static
1203 */1203 */
1204 static clearSessionCookie(callback: AsyncCallback<void>): void;1204 static clearSessionCookie(callback: AsyncCallback<void>): void;
1205+ 
1206+ /**
1207+ * Delays the initialization of the web engine. By default, the web engine is initialized
1208+ * when the CookieManager interface is called. By setting the 'lazy' parameter to true,
1209+ * the web engine will not be initialized when the CookieManager interface is called.
1210+ * Instead, the web engine will be initialized either when the web component is created
1211+ * or when initializeWebEngine is called.
1212+ *
1213+ * @param { boolean } lazy - Controls whether to delay the initialization of the web engine.
1214+ * @static
1215+ * @syscap SystemCapability.Web.Webview.Core
1216+ * @since 23 static
1217+ */
1218+ static setLazyInitializeWebEngine(lazy: boolean): void;
1205 }1219 }
1206 1220 
1207 /**1221 /**