• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * @file
18 * @kit ArkWeb
19 */
20
21/**
22 * Provides methods for controlling the web controller.
23 *
24 * @syscap SystemCapability.Web.Webview.Core
25 * @since 9
26 */
27/**
28 * Provides methods for controlling the web controller.
29 *
30 * @syscap SystemCapability.Web.Webview.Core
31 * @crossplatform
32 * @since 10
33 */
34/**
35 * Provides methods for controlling the web controller.
36 *
37 * @typedef { import('../api/@ohos.web.webview').default.WebviewController }
38 * @syscap SystemCapability.Web.Webview.Core
39 * @crossplatform
40 * @atomicservice
41 * @since 11
42 */
43declare type WebviewController = import('../api/@ohos.web.webview').default.WebviewController;
44
45/**
46 * The callback of load committed.
47 *
48 * @typedef { function } OnNavigationEntryCommittedCallback
49 * @param { LoadCommittedDetails } loadCommittedDetails - callback information of onNavigationEntryCommitted.
50 * @syscap SystemCapability.Web.Webview.Core
51 * @atomicservice
52 * @since 11
53 */
54type OnNavigationEntryCommittedCallback = (loadCommittedDetails: LoadCommittedDetails) => void;
55
56/**
57 * The callback of ssl error event.
58 *
59 * @typedef { function } OnSslErrorEventCallback
60 * @param { SslErrorEvent } sslErrorEvent - callback information of onSslErrorEvent.
61 * @syscap SystemCapability.Web.Webview.Core
62 * @atomicservice
63 * @since 12
64 */
65type OnSslErrorEventCallback = (sslErrorEvent: SslErrorEvent) => void;
66
67/**
68 * The callback of largestContentfulPaint.
69 *
70 * @typedef { function } OnLargestContentfulPaintCallback
71 * @param { LargestContentfulPaint } largestContentfulPaint - callback information of onLargestContentfulPaint.
72 * @syscap SystemCapability.Web.Webview.Core
73 * @atomicservice
74 * @since 12
75 */
76type OnLargestContentfulPaintCallback = (largestContentfulPaint: LargestContentfulPaint) => void;
77
78/**
79 * The callback of firstMeaningfulPaint.
80 *
81 * @typedef { function } OnFirstMeaningfulPaintCallback
82 * @param { FirstMeaningfulPaint } firstMeaningfulPaint - callback information of onFirstMeaningfulPaint.
83 * @syscap SystemCapability.Web.Webview.Core
84 * @atomicservice
85 * @since 12
86 */
87type OnFirstMeaningfulPaintCallback = (firstMeaningfulPaint: FirstMeaningfulPaint) => void;
88
89/**
90 * The callback of onOverrideUrlLoading.
91 * Should not call WebviewController.loadUrl with the request's URL and then return true.
92 *
93 * @typedef { function } OnOverrideUrlLoadingCallback
94 * @param { WebResourceRequest } webResourceRequest - callback information of onOverrideUrlLoading.
95 * @returns { boolean } - Returning true causes the current Web to abort loading the URL,
96 *                        false causes the Web to continue loading the url as usual.
97 * @syscap SystemCapability.Web.Webview.Core
98 * @atomicservice
99 * @since 12
100 */
101type OnOverrideUrlLoadingCallback = (webResourceRequest: WebResourceRequest) => boolean;
102
103/**
104 * The callback of Intelligent Tracking Prevention.
105 *
106 * @typedef { function } OnIntelligentTrackingPreventionCallback
107 * @param { IntelligentTrackingPreventionDetails } details - callback information of onIntelligentTrackingPrevention.
108 * @syscap SystemCapability.Web.Webview.Core
109 * @atomicservice
110 * @since 12
111 */
112type OnIntelligentTrackingPreventionCallback = (details: IntelligentTrackingPreventionDetails) => void;
113
114/**
115 * The callback of onNativeEmbedVisibilityChange.
116 *
117 * @typedef { function } OnNativeEmbedVisibilityChangeCallback
118 * @param { NativeEmbedVisibilityInfo } nativeEmbedVisibilityInfo - callback information of onNativeEmbedVisibilityChange.
119 * @syscap SystemCapability.Web.Webview.Core
120 * @since 12
121 */
122type OnNativeEmbedVisibilityChangeCallback = (nativeEmbedVisibilityInfo: NativeEmbedVisibilityInfo) => void;
123
124/**
125 * The configuration of native media player.
126 *
127 * @typedef NativeMediaPlayerConfig
128 * @syscap SystemCapability.Web.Webview.Core
129 * @atomicservice
130 * @since 12
131 */
132declare interface NativeMediaPlayerConfig {
133  /**
134   * Should playing web media by native application instead of web player.
135   *
136   * @type { boolean }
137   * @syscap SystemCapability.Web.Webview.Core
138   * @atomicservice
139   * @since 12
140   */
141  enable: boolean;
142
143  /**
144   * The contents painted by native media player should overlay web page.
145   *
146   * @type { boolean }
147   * @syscap SystemCapability.Web.Webview.Core
148   * @atomicservice
149   * @since 12
150   */
151  shouldOverlay: boolean;
152}
153
154/**
155 * The callback of render process not responding.
156 *
157 * @typedef { function } OnRenderProcessNotRespondingCallback
158 * @param { RenderProcessNotRespondingData } data - details of onRenderProcessNotResponding.
159 * @syscap SystemCapability.Web.Webview.Core
160 * @since 12
161 */
162type OnRenderProcessNotRespondingCallback = (data : RenderProcessNotRespondingData) => void;
163
164/**
165 * The callback of render process responding.
166 *
167 * @typedef { function } OnRenderProcessRespondingCallback
168 * @syscap SystemCapability.Web.Webview.Core
169 * @since 12
170 */
171type OnRenderProcessRespondingCallback = () => void;
172
173/**
174* The callback of ViewportFit Changed.
175 *
176 * @typedef { function } OnViewportFitChangedCallback
177 * @param { ViewportFit } viewportFit - details of OnViewportFitChangedCallback.
178 * @syscap SystemCapability.Web.Webview.Core
179 * @atomicservice
180 * @since 12
181 */
182type OnViewportFitChangedCallback = (viewportFit: ViewportFit) => void;
183
184/**
185 * The callback of ads block
186 *
187 * @typedef { function } OnAdsBlockedCallback
188 * @param { AdsBlockedDetails } details - details of OnAdsBlockedCallback.
189 * @syscap SystemCapability.Web.Webview.Core
190 * @atomicservice
191 * @since 12
192 */
193type OnAdsBlockedCallback = (details: AdsBlockedDetails) => void;
194
195/**
196 * Defines the ads block details.
197 *
198 * @interface AdsBlockedDetails
199 * @syscap SystemCapability.Web.Webview.Core
200 * @atomicservice
201 * @since 12
202 */
203declare interface AdsBlockedDetails {
204  /**
205   * The url of main frame.
206   *
207   * @type { string }
208   * @syscap SystemCapability.Web.Webview.Core
209   * @atomicservice
210   * @since 12
211   */
212  url: string;
213
214  /**
215   * the url of ads.
216   *
217   * @type { Array<string> }
218   * @syscap SystemCapability.Web.Webview.Core
219   * @atomicservice
220   * @since 12
221   */
222  adsBlocked: Array<string>;
223}
224
225/**
226 * Defines the web keyboard options when onInterceptKeyboardAttach event return.
227 *
228 * @interface WebKeyboardOptions
229 * @syscap SystemCapability.Web.Webview.Core
230 * @atomicservice
231 * @since 12
232 */
233declare interface WebKeyboardOptions {
234  /**
235   * Whether the system keyboard is used.
236   *
237   * @type { boolean }
238   * @syscap SystemCapability.Web.Webview.Core
239   * @atomicservice
240   * @since 12
241   */
242  useSystemKeyboard: boolean;
243  /**
244   * Set the enter key type when the system keyboard is used, the "enter" key related to the {@link inputMethodEngine}.
245   *
246   * @type { ?number }
247   * @syscap SystemCapability.Web.Webview.Core
248   * @atomicservice
249   * @since 12
250   */
251  enterKeyType?: number;
252  /**
253   * Set the custom keyboard builder when the custom keyboard is used.
254   *
255   * @type { ?CustomBuilder }
256   * @syscap SystemCapability.Web.Webview.Core
257   * @atomicservice
258   * @since 12
259   */
260  customKeyboard?: CustomBuilder;
261}
262
263/**
264 * Define the controller to interact with a custom keyboard, related to the {@link onInterceptKeyboardAttach} event.
265 *
266 * @syscap SystemCapability.Web.Webview.Core
267 * @atomicservice
268 * @since 12
269 */
270declare class WebKeyboardController {
271  /**
272   * Constructor.
273   *
274   * @syscap SystemCapability.Web.Webview.Core
275   * @atomicservice
276   * @since 12
277   */
278  constructor();
279
280  /**
281   * Insert text into Editor.
282   *
283   * @param { string } text - text which will be inserted.
284   * @syscap SystemCapability.Web.Webview.Core
285   * @since 12
286   */
287  insertText(text: string): void;
288  /**
289   * Delete text from back to front.
290   *
291   * @param { number } length - length of text, which will be deleted from back to front.
292   * @syscap SystemCapability.Web.Webview.Core
293   * @since 12
294   */
295  deleteForward(length: number): void;
296  /**
297   * Delete text from front to back.
298   *
299   * @param { number } length - length of text, which will be deleted from front to back.
300   * @syscap SystemCapability.Web.Webview.Core
301   * @since 12
302   */
303  deleteBackward(length: number): void;
304  /**
305   * Send the function of the key.
306   *
307   * @param { number } key - action indicates the "enter" key related to the {@link inputMethodEngine}
308   * @syscap SystemCapability.Web.Webview.Core
309   * @since 12
310   */
311  sendFunctionKey(key: number): void;
312  /**
313   * Close the custom keyboard.
314   *
315   * @syscap SystemCapability.Web.Webview.Core
316   * @since 12
317   */
318  close(): void;
319}
320
321/**
322 * Defines the web keyboard callback info related to the {@link onInterceptKeyboardAttach} event.
323 *
324 * @interface WebKeyboardCallbackInfo
325 * @syscap SystemCapability.Web.Webview.Core
326 * @atomicservice
327 * @since 12
328 */
329declare interface WebKeyboardCallbackInfo {
330  /**
331   * The web keyboard controller.
332   *
333   * @type { WebKeyboardController }
334   * @syscap SystemCapability.Web.Webview.Core
335   * @atomicservice
336   * @since 12
337   */
338  controller: WebKeyboardController;
339  /**
340   * The attributes of web input element.
341   *
342   * @type { Record<string, string> }
343   * @syscap SystemCapability.Web.Webview.Core
344   * @atomicservice
345   * @since 12
346   */
347  attributes: Record<string, string>;
348}
349
350/**
351 * The callback of onInterceptKeyboardAttach event.
352 *
353 * @typedef { function } WebKeyboardCallback
354 * @param { WebKeyboardCallbackInfo } keyboardCallbackInfo - callback information of onInterceptKeyboardAttach.
355 * @returns { WebKeyboardOptions } Return the web keyboard options of this web component.
356 * @syscap SystemCapability.Web.Webview.Core
357 * @atomicservice
358 * @since 12
359 */
360type WebKeyboardCallback = (keyboardCallbackInfo: WebKeyboardCallbackInfo) => WebKeyboardOptions;
361
362/**
363 * Enum type supplied to {@link getMessageLevel} for receiving the console log level of JavaScript.
364 *
365 * @enum { number }
366 * @syscap SystemCapability.Web.Webview.Core
367 * @since 8
368 */
369/**
370 * Enum type supplied to {@link getMessageLevel} for receiving the console log level of JavaScript.
371 *
372 * @enum { number }
373 * @syscap SystemCapability.Web.Webview.Core
374 * @crossplatform
375 * @atomicservice
376 * @since 11
377 */
378declare enum MessageLevel {
379  /**
380   * Debug level.
381   *
382   * @syscap SystemCapability.Web.Webview.Core
383   * @since 8
384   */
385  /**
386   * Debug level.
387   *
388   * @syscap SystemCapability.Web.Webview.Core
389   * @crossplatform
390   * @atomicservice
391   * @since 11
392   */
393  Debug,
394
395  /**
396   * Error level.
397   *
398   * @syscap SystemCapability.Web.Webview.Core
399   * @since 8
400   */
401  /**
402   * Error level.
403   *
404   * @syscap SystemCapability.Web.Webview.Core
405   * @crossplatform
406   * @atomicservice
407   * @since 11
408   */
409  Error,
410
411  /**
412   * Info level.
413   *
414   * @syscap SystemCapability.Web.Webview.Core
415   * @since 8
416   */
417  /**
418   * Info level.
419   *
420   * @syscap SystemCapability.Web.Webview.Core
421   * @crossplatform
422   * @atomicservice
423   * @since 11
424   */
425  Info,
426
427  /**
428   * Log level.
429   *
430   * @syscap SystemCapability.Web.Webview.Core
431   * @since 8
432   */
433  /**
434   * Log level.
435   *
436   * @syscap SystemCapability.Web.Webview.Core
437   * @crossplatform
438   * @atomicservice
439   * @since 11
440   */
441  Log,
442
443  /**
444   * Warn level.
445   *
446   * @syscap SystemCapability.Web.Webview.Core
447   * @since 8
448   */
449  /**
450   * Warn level.
451   *
452   * @syscap SystemCapability.Web.Webview.Core
453   * @crossplatform
454   * @atomicservice
455   * @since 11
456   */
457  Warn,
458}
459
460/**
461 * The Web's behavior to load from HTTP or HTTPS. Defaults to MixedMode.None.
462 *
463 * @enum { number }
464 * @syscap SystemCapability.Web.Webview.Core
465 * @since 8
466 */
467/**
468 * The Web's behavior to load from HTTP or HTTPS. Defaults to MixedMode.None.
469 *
470 * @enum { number }
471 * @syscap SystemCapability.Web.Webview.Core
472 * @atomicservice
473 * @since 11
474 */
475declare enum MixedMode {
476  /**
477   * Allows all sources.
478   *
479   * @syscap SystemCapability.Web.Webview.Core
480   * @since 8
481   */
482  /**
483   * Allows all sources.
484   *
485   * @syscap SystemCapability.Web.Webview.Core
486   * @atomicservice
487   * @since 11
488   */
489  All,
490
491  /**
492   * Allows sources Compatibly.
493   *
494   * @syscap SystemCapability.Web.Webview.Core
495   * @since 8
496   */
497  /**
498   * Allows sources Compatibly.
499   *
500   * @syscap SystemCapability.Web.Webview.Core
501   * @atomicservice
502   * @since 11
503   */
504  Compatible,
505
506  /**
507   * Don't allow unsecure sources from a secure origin.
508   *
509   * @syscap SystemCapability.Web.Webview.Core
510   * @since 8
511   */
512  /**
513   * Don't allow unsecure sources from a secure origin.
514   *
515   * @syscap SystemCapability.Web.Webview.Core
516   * @atomicservice
517   * @since 11
518   */
519  None,
520}
521
522/**
523 * The callback of safe browsing check.
524 *
525 * @typedef { function } OnSafeBrowsingCheckResultCallback
526 * @param { ThreatType } threatType - callback information of onSafeBrowsingCheckResult.
527 * @syscap SystemCapability.Web.Webview.Core
528 * @atomicservice
529 * @since 11
530 */
531type OnSafeBrowsingCheckResultCallback = (threatType: ThreatType) => void;
532
533/**
534 * Enum type supplied to {@link getHitTest} for indicating the cursor node HitTest.
535 *
536 * @enum { number }
537 * @syscap SystemCapability.Web.Webview.Core
538 * @since 8
539 */
540/**
541 * Enum type supplied to {@link getHitTest} for indicating the cursor node HitTest.
542 *
543 * @enum { number }
544 * @syscap SystemCapability.Web.Webview.Core
545 * @atomicservice
546 * @since 11
547 */
548declare enum HitTestType {
549  /**
550   * The edit text.
551   *
552   * @syscap SystemCapability.Web.Webview.Core
553   * @since 8
554   */
555  /**
556   * The edit text.
557   *
558   * @syscap SystemCapability.Web.Webview.Core
559   * @atomicservice
560   * @since 11
561   */
562  EditText,
563
564  /**
565   * The email address.
566   *
567   * @syscap SystemCapability.Web.Webview.Core
568   * @since 8
569   */
570  /**
571   * The email address.
572   *
573   * @syscap SystemCapability.Web.Webview.Core
574   * @atomicservice
575   * @since 11
576   */
577  Email,
578
579  /**
580   * The HTML::a tag with src=http.
581   *
582   * @syscap SystemCapability.Web.Webview.Core
583   * @since 8
584   */
585  /**
586   * The HTML::a tag with src=http.
587   *
588   * @syscap SystemCapability.Web.Webview.Core
589   * @atomicservice
590   * @since 11
591   */
592  HttpAnchor,
593
594  /**
595   * The HTML::a tag with src=http + HTML::img.
596   *
597   * @syscap SystemCapability.Web.Webview.Core
598   * @since 8
599   */
600  /**
601   * The HTML::a tag with src=http + HTML::img.
602   *
603   * @syscap SystemCapability.Web.Webview.Core
604   * @atomicservice
605   * @since 11
606   */
607  HttpAnchorImg,
608
609  /**
610   * The HTML::img tag.
611   *
612   * @syscap SystemCapability.Web.Webview.Core
613   * @since 8
614   */
615  /**
616   * The HTML::img tag.
617   *
618   * @syscap SystemCapability.Web.Webview.Core
619   * @atomicservice
620   * @since 11
621   */
622  Img,
623
624  /**
625   * The map address.
626   *
627   * @syscap SystemCapability.Web.Webview.Core
628   * @since 8
629   */
630  /**
631   * The map address.
632   *
633   * @syscap SystemCapability.Web.Webview.Core
634   * @atomicservice
635   * @since 11
636   */
637  Map,
638
639  /**
640   * The phone number.
641   *
642   * @syscap SystemCapability.Web.Webview.Core
643   * @since 8
644   */
645  /**
646   * The phone number.
647   *
648   * @syscap SystemCapability.Web.Webview.Core
649   * @atomicservice
650   * @since 11
651   */
652  Phone,
653
654  /**
655   * Other unknown HitTest.
656   *
657   * @syscap SystemCapability.Web.Webview.Core
658   * @since 8
659   */
660  /**
661   * Other unknown HitTest.
662   *
663   * @syscap SystemCapability.Web.Webview.Core
664   * @atomicservice
665   * @since 11
666   */
667  Unknown,
668}
669
670/**
671 * Enum type supplied to {@link cacheMode} for setting the Web cache mode.
672 *
673 * @enum { number }
674 * @syscap SystemCapability.Web.Webview.Core
675 * @since 8
676 */
677/**
678 * Enum type supplied to {@link cacheMode} for setting the Web cache mode.
679 *
680 * @enum { number }
681 * @syscap SystemCapability.Web.Webview.Core
682 * @atomicservice
683 * @since 11
684 */
685declare enum CacheMode {
686  /**
687   * load cache when they are available and not expired, otherwise load online.
688   *
689   * @syscap SystemCapability.Web.Webview.Core
690   * @since 9
691   */
692  /**
693   * load cache when they are available and not expired, otherwise load online.
694   *
695   * @syscap SystemCapability.Web.Webview.Core
696   * @atomicservice
697   * @since 11
698   */
699  Default,
700
701  /**
702   * load cache when they are available, otherwise load online.
703   *
704   * @syscap SystemCapability.Web.Webview.Core
705   * @since 8
706   */
707  /**
708   * load cache when they are available, otherwise load online.
709   *
710   * @syscap SystemCapability.Web.Webview.Core
711   * @atomicservice
712   * @since 11
713   */
714  None,
715
716  /**
717   * Load online and not cache.
718   *
719   * @syscap SystemCapability.Web.Webview.Core
720   * @since 8
721   */
722  /**
723   * Load online and not cache.
724   *
725   * @syscap SystemCapability.Web.Webview.Core
726   * @atomicservice
727   * @since 11
728   */
729  Online,
730
731  /**
732   * load cache and not online.
733   *
734   * @syscap SystemCapability.Web.Webview.Core
735   * @since 8
736   */
737  /**
738   * load cache and not online.
739   *
740   * @syscap SystemCapability.Web.Webview.Core
741   * @atomicservice
742   * @since 11
743   */
744  Only,
745}
746
747/**
748 * Enum type supplied to {@link overScrollMode} for setting the web overScroll mode.
749 *
750 * @enum { number }
751 * @syscap SystemCapability.Web.Webview.Core
752 * @atomicservice
753 * @since 11
754 */
755declare enum OverScrollMode {
756  /**
757   * Disable the web over-scroll mode.
758   *
759   * @syscap SystemCapability.Web.Webview.Core
760   * @atomicservice
761   * @since 11
762   */
763  NEVER,
764  /**
765   * Enable the web over-scroll mode.
766   *
767   * @syscap SystemCapability.Web.Webview.Core
768   * @atomicservice
769   * @since 11
770   */
771  ALWAYS
772}
773
774/**
775 * Enum type supplied to {@link blurOnKeyboardHideMode} for setting the web blurOnKeyboardHide mode.
776 *
777 * @enum { number }
778 * @syscap SystemCapability.Web.Webview.Core
779 * @atomicservice
780 * @since 14
781 */
782declare enum BlurOnKeyboardHideMode {
783  /**
784   * The focused input elements on webview will not blur when soft keyboard is hidden manually.
785   *
786   * @syscap SystemCapability.Web.Webview.Core
787   * @atomicservice
788   * @since 14
789   */
790  SILENT,
791  /**
792   * The focused input elements on webview will blur when soft keyboard is hidden manually.
793   *
794   * @syscap SystemCapability.Web.Webview.Core
795   * @atomicservice
796   * @since 14
797   */
798  BLUR
799}
800
801/**
802 * Enum type supplied to {@link darkMode} for setting the web dark mode.
803 *
804 * @enum { number }
805 * @syscap SystemCapability.Web.Webview.Core
806 * @since 9
807 */
808/**
809 * Enum type supplied to {@link darkMode} for setting the web dark mode.
810 *
811 * @enum { number }
812 * @syscap SystemCapability.Web.Webview.Core
813 * @atomicservice
814 * @since 11
815 */
816declare enum WebDarkMode {
817  /**
818   * Disable the web dark mode.
819   *
820   * @syscap SystemCapability.Web.Webview.Core
821   * @since 9
822   */
823  /**
824   * Disable the web dark mode.
825   *
826   * @syscap SystemCapability.Web.Webview.Core
827   * @atomicservice
828   * @since 11
829   */
830  Off,
831
832  /**
833   * Enable the web dark mode.
834   *
835   * @syscap SystemCapability.Web.Webview.Core
836   * @since 9
837   */
838  /**
839   * Enable the web dark mode.
840   *
841   * @syscap SystemCapability.Web.Webview.Core
842   * @atomicservice
843   * @since 11
844   */
845  On,
846
847  /**
848   * Make web dark mode follow the system.
849   *
850   * @syscap SystemCapability.Web.Webview.Core
851   * @since 9
852   */
853  /**
854   * Make web dark mode follow the system.
855   *
856   * @syscap SystemCapability.Web.Webview.Core
857   * @atomicservice
858   * @since 11
859   */
860  Auto,
861}
862
863/**
864 * Enum type supplied to {@link captureMode} for setting the web capture mode.
865 *
866 * @enum { number }
867 * @syscap SystemCapability.Web.Webview.Core
868 * @since 10
869 */
870/**
871 * Enum type supplied to {@link captureMode} for setting the web capture mode.
872 *
873 * @enum { number }
874 * @syscap SystemCapability.Web.Webview.Core
875 * @atomicservice
876 * @since 11
877 */
878declare enum WebCaptureMode {
879  /**
880   * The home screen.
881   * @syscap SystemCapability.Web.Webview.Core
882   * @since 10
883   */
884  /**
885   * The home screen.
886   * @syscap SystemCapability.Web.Webview.Core
887   * @atomicservice
888   * @since 11
889   */
890  HOME_SCREEN = 0,
891}
892
893/**
894 * Enum type supplied to {@link threatType} for the website's threat type.
895 *
896 * @enum { number }
897 * @syscap SystemCapability.Web.Webview.Core
898 * @atomicservice
899 * @since 11
900 */
901declare enum ThreatType {
902  /**
903   * Illegal websites.
904   *
905   * @syscap SystemCapability.Web.Webview.Core
906   * @atomicservice
907   * @since 11
908   */
909  THREAT_ILLEGAL = 0,
910
911  /**
912   * Fraud websites.
913   *
914   * @syscap SystemCapability.Web.Webview.Core
915   * @atomicservice
916   * @since 11
917   */
918  THREAT_FRAUD = 1,
919
920  /**
921   * Websites with security risks.
922   *
923   * @syscap SystemCapability.Web.Webview.Core
924   * @atomicservice
925   * @since 11
926   */
927  THREAT_RISK = 2,
928
929  /**
930   * Websites suspected of containing unhealthy content.
931   * ArkWeb will not intercept this type of website and apps could handle it themselves.
932   *
933   * @syscap SystemCapability.Web.Webview.Core
934   * @atomicservice
935   * @since 11
936   */
937  THREAT_WARNING = 3,
938}
939
940/**
941 * Defines the Media Options.
942 *
943 * @interface WebMediaOptions
944 * @syscap SystemCapability.Web.Webview.Core
945 * @since 10
946 */
947/**
948 * Defines the Media Options.
949 *
950 * @interface WebMediaOptions
951 * @syscap SystemCapability.Web.Webview.Core
952 * @atomicservice
953 * @since 11
954 */
955/**
956 * Defines the Media Options.
957 *
958 * @typedef WebMediaOptions
959 * @syscap SystemCapability.Web.Webview.Core
960 * @atomicservice
961 * @since 12
962 */
963declare interface WebMediaOptions {
964  /**
965   * The time interval for audio playback to resume.
966   *
967   * @type { ?number }
968   * @syscap SystemCapability.Web.Webview.Core
969   * @since 10
970   */
971  /**
972   * The time interval for audio playback to resume.
973   *
974   * @type { ?number }
975   * @syscap SystemCapability.Web.Webview.Core
976   * @atomicservice
977   * @since 11
978   */
979  resumeInterval?: number;
980  /**
981   * Whether the audio of each web is exclusive.
982   *
983   * @type { ?boolean }
984   * @syscap SystemCapability.Web.Webview.Core
985   * @since 10
986   */
987  /**
988   * Whether the audio of each web is exclusive.
989   *
990   * @type { ?boolean }
991   * @syscap SystemCapability.Web.Webview.Core
992   * @atomicservice
993   * @since 11
994   */
995  audioExclusive?: boolean;
996}
997
998/**
999 * Defines the screen capture configuration.
1000 *
1001 * @interface ScreenCaptureConfig
1002 * @syscap SystemCapability.Web.Webview.Core
1003 * @since 10
1004 */
1005/**
1006 * Defines the screen capture configuration.
1007 *
1008 * @interface ScreenCaptureConfig
1009 * @syscap SystemCapability.Web.Webview.Core
1010 * @atomicservice
1011 * @since 11
1012 */
1013/**
1014 * Defines the screen capture configuration.
1015 *
1016 * @typedef ScreenCaptureConfig
1017 * @syscap SystemCapability.Web.Webview.Core
1018 * @atomicservice
1019 * @since 12
1020 */
1021declare interface ScreenCaptureConfig {
1022  /**
1023   * The mode for selecting the recording area.
1024   *
1025   * @type { WebCaptureMode }
1026   * @syscap SystemCapability.Web.Webview.Core
1027   * @since 10
1028   */
1029  /**
1030   * The mode for selecting the recording area.
1031   *
1032   * @type { WebCaptureMode }
1033   * @syscap SystemCapability.Web.Webview.Core
1034   * @atomicservice
1035   * @since 11
1036   */
1037  captureMode: WebCaptureMode;
1038}
1039
1040/**
1041 * Define the handler to exit the full screen mode, related to the {@link onFullScreenEnter} event.
1042 *
1043 * @syscap SystemCapability.Web.Webview.Core
1044 * @since 9
1045 */
1046/**
1047 * Define the handler to exit the full screen mode, related to the {@link onFullScreenEnter} event.
1048 *
1049 * @syscap SystemCapability.Web.Webview.Core
1050 * @atomicservice
1051 * @since 11
1052 */
1053declare class FullScreenExitHandler {
1054  /**
1055   * Constructor.
1056   *
1057   * @syscap SystemCapability.Web.Webview.Core
1058   * @since 9
1059   */
1060  /**
1061   * Constructor.
1062   *
1063   * @syscap SystemCapability.Web.Webview.Core
1064   * @atomicservice
1065   * @since 11
1066   */
1067  constructor();
1068
1069  /**
1070   * Exit the full screen mode.
1071   *
1072   * @syscap SystemCapability.Web.Webview.Core
1073   * @since 9
1074   */
1075  /**
1076   * Exit the full screen mode.
1077   *
1078   * @syscap SystemCapability.Web.Webview.Core
1079   * @atomicservice
1080   * @since 11
1081   */
1082  exitFullScreen(): void;
1083}
1084
1085/**
1086 * Defines the event details when the web component enter full screen mode.
1087 *
1088 * @typedef FullScreenEnterEvent
1089 * @syscap SystemCapability.Web.Webview.Core
1090 * @atomicservice
1091 * @since 12
1092 */
1093declare interface FullScreenEnterEvent {
1094  /**
1095   * A function handle to exit full-screen mode.
1096   *
1097   * @type { FullScreenExitHandler }
1098   * @syscap SystemCapability.Web.Webview.Core
1099   * @atomicservice
1100   * @since 12
1101   */
1102  handler: FullScreenExitHandler;
1103  /**
1104   * The intrinsic width of the video if the fullscreen element contains video element, expressed in CSS pixels.
1105   *
1106   * @type { ?number }
1107   * @syscap SystemCapability.Web.Webview.Core
1108   * @atomicservice
1109   * @since 12
1110   */
1111  videoWidth?: number;
1112  /**
1113   * The intrinsic height of the video if the fullscreen element contains video element, expressed in CSS pixels.
1114   *
1115   * @type { ?number }
1116   * @syscap SystemCapability.Web.Webview.Core
1117   * @atomicservice
1118   * @since 12
1119   */
1120  videoHeight?: number;
1121}
1122
1123/**
1124 * The callback when the web component enter full screen mode.
1125 *
1126 * @typedef { function } OnFullScreenEnterCallback
1127 * @param { FullScreenEnterEvent } event - callback information of onFullScreenEnter.
1128 * @syscap SystemCapability.Web.Webview.Core
1129 * @atomicservice
1130 * @since 12
1131 */
1132type OnFullScreenEnterCallback = (event: FullScreenEnterEvent) => void;
1133
1134/**
1135 * Enum type supplied to {@link renderExitReason} when onRenderExited being called.
1136 *
1137 * @enum { number }
1138 * @syscap SystemCapability.Web.Webview.Core
1139 * @since 9
1140 */
1141/**
1142 * Enum type supplied to {@link renderExitReason} when onRenderExited being called.
1143 *
1144 * @enum { number }
1145 * @syscap SystemCapability.Web.Webview.Core
1146 * @atomicservice
1147 * @since 11
1148 */
1149declare enum RenderExitReason {
1150  /**
1151   * Render process non-zero exit status.
1152   *
1153   * @syscap SystemCapability.Web.Webview.Core
1154   * @since 9
1155   */
1156  /**
1157   * Render process non-zero exit status.
1158   *
1159   * @syscap SystemCapability.Web.Webview.Core
1160   * @atomicservice
1161   * @since 11
1162   */
1163  ProcessAbnormalTermination,
1164
1165  /**
1166   * SIGKILL or task manager kill.
1167   *
1168   * @syscap SystemCapability.Web.Webview.Core
1169   * @since 9
1170   */
1171  /**
1172   * SIGKILL or task manager kill.
1173   *
1174   * @syscap SystemCapability.Web.Webview.Core
1175   * @atomicservice
1176   * @since 11
1177   */
1178  ProcessWasKilled,
1179
1180  /**
1181   * Segmentation fault.
1182   *
1183   * @syscap SystemCapability.Web.Webview.Core
1184   * @since 9
1185   */
1186  /**
1187   * Segmentation fault.
1188   *
1189   * @syscap SystemCapability.Web.Webview.Core
1190   * @atomicservice
1191   * @since 11
1192   */
1193  ProcessCrashed,
1194
1195  /**
1196   * Out of memory.
1197   *
1198   * @syscap SystemCapability.Web.Webview.Core
1199   * @since 9
1200   */
1201  /**
1202   * Out of memory.
1203   *
1204   * @syscap SystemCapability.Web.Webview.Core
1205   * @atomicservice
1206   * @since 11
1207   */
1208  ProcessOom,
1209
1210  /**
1211   * Unknown reason.
1212   *
1213   * @syscap SystemCapability.Web.Webview.Core
1214   * @since 9
1215   */
1216  /**
1217   * Unknown reason.
1218   *
1219   * @syscap SystemCapability.Web.Webview.Core
1220   * @atomicservice
1221   * @since 11
1222   */
1223  ProcessExitUnknown,
1224}
1225
1226  /**
1227   * The callback of custom hide of the context menu.
1228   *
1229   * @typedef { function } OnContextMenuHideCallback
1230   * @syscap SystemCapability.Web.Webview.Core
1231   * @atomicservice
1232   * @since 11
1233   */
1234  type OnContextMenuHideCallback = () => void;
1235
1236/**
1237 * Enum type supplied to {@link error} when onSslErrorEventReceive being called.
1238 *
1239 * @enum { number }
1240 * @syscap SystemCapability.Web.Webview.Core
1241 * @since 9
1242 */
1243/**
1244 * Enum type supplied to {@link error} when onSslErrorEventReceive being called.
1245 *
1246 * @enum { number }
1247 * @syscap SystemCapability.Web.Webview.Core
1248 * @atomicservice
1249 * @since 11
1250 */
1251declare enum SslError {
1252  /**
1253   * General error.
1254   *
1255   * @syscap SystemCapability.Web.Webview.Core
1256   * @since 9
1257   */
1258  /**
1259   * General error.
1260   *
1261   * @syscap SystemCapability.Web.Webview.Core
1262   * @atomicservice
1263   * @since 11
1264   */
1265  Invalid,
1266
1267  /**
1268   * Hostname mismatch.
1269   *
1270   * @syscap SystemCapability.Web.Webview.Core
1271   * @since 9
1272   */
1273  /**
1274   * Hostname mismatch.
1275   *
1276   * @syscap SystemCapability.Web.Webview.Core
1277   * @atomicservice
1278   * @since 11
1279   */
1280  HostMismatch,
1281
1282  /**
1283   * The certificate date is invalid.
1284   *
1285   * @syscap SystemCapability.Web.Webview.Core
1286   * @since 9
1287   */
1288  /**
1289   * The certificate date is invalid.
1290   *
1291   * @syscap SystemCapability.Web.Webview.Core
1292   * @atomicservice
1293   * @since 11
1294   */
1295  DateInvalid,
1296
1297  /**
1298   * The certificate authority is not trusted.
1299   *
1300   * @syscap SystemCapability.Web.Webview.Core
1301   * @since 9
1302   */
1303  /**
1304   * The certificate authority is not trusted.
1305   *
1306   * @syscap SystemCapability.Web.Webview.Core
1307   * @atomicservice
1308   * @since 11
1309   */
1310  Untrusted,
1311}
1312
1313/**
1314 * Enum type supplied to {@link FileSelectorParam} when onFileSelectorShow being called.
1315 *
1316 * @enum { number }
1317 * @syscap SystemCapability.Web.Webview.Core
1318 * @since 9
1319 */
1320/**
1321 * Enum type supplied to {@link FileSelectorParam} when onFileSelectorShow being called.
1322 *
1323 * @enum { number }
1324 * @syscap SystemCapability.Web.Webview.Core
1325 * @crossplatform
1326 * @atomicservice
1327 * @since 11
1328 */
1329declare enum FileSelectorMode {
1330  /**
1331   * Allows single file to be selected.
1332   *
1333   * @syscap SystemCapability.Web.Webview.Core
1334   * @since 9
1335   */
1336  /**
1337   * Allows single file to be selected.
1338   *
1339   * @syscap SystemCapability.Web.Webview.Core
1340   * @crossplatform
1341   * @atomicservice
1342   * @since 11
1343   */
1344  FileOpenMode,
1345
1346  /**
1347   * Allows multiple files to be selected.
1348   *
1349   * @syscap SystemCapability.Web.Webview.Core
1350   * @since 9
1351   */
1352  /**
1353   * Allows multiple files to be selected.
1354   *
1355   * @syscap SystemCapability.Web.Webview.Core
1356   * @crossplatform
1357   * @atomicservice
1358   * @since 11
1359   */
1360  FileOpenMultipleMode,
1361
1362  /**
1363   * Allows file folders to be selected.
1364   *
1365   * @syscap SystemCapability.Web.Webview.Core
1366   * @since 9
1367   */
1368  /**
1369   * Allows file folders to be selected.
1370   *
1371   * @syscap SystemCapability.Web.Webview.Core
1372   * @crossplatform
1373   * @atomicservice
1374   * @since 11
1375   */
1376  FileOpenFolderMode,
1377
1378  /**
1379   * Allows select files to save.
1380   *
1381   * @syscap SystemCapability.Web.Webview.Core
1382   * @since 9
1383   */
1384  /**
1385   * Allows select files to save.
1386   *
1387   * @syscap SystemCapability.Web.Webview.Core
1388   * @crossplatform
1389   * @atomicservice
1390   * @since 11
1391   */
1392  FileSaveMode,
1393}
1394
1395/**
1396 * Enum type supplied to {@link layoutMode} for setting the web layout mode.
1397 *
1398 * @enum { number }
1399 * @syscap SystemCapability.Web.Webview.Core
1400 * @atomicservice
1401 * @since 11
1402 */
1403declare enum WebLayoutMode {
1404  /**
1405   * Web layout follows the system.
1406   *
1407   * @syscap SystemCapability.Web.Webview.Core
1408   * @atomicservice
1409   * @since 11
1410   */
1411  NONE,
1412
1413  /**
1414   * Adaptive web layout based on page size.
1415   *
1416   * @syscap SystemCapability.Web.Webview.Core
1417   * @atomicservice
1418   * @since 11
1419   */
1420  FIT_CONTENT,
1421}
1422
1423/**
1424 * Enum type supplied to {@link RenderProcessNotRespondingData} when onRenderProcessNotResponding is called.
1425 *
1426 * @enum { number }
1427 * @syscap SystemCapability.Web.Webview.Core
1428 * @since 12
1429 */
1430declare enum RenderProcessNotRespondingReason {
1431  /**
1432   * Timeout for input sent to render process.
1433   *
1434   * @syscap SystemCapability.Web.Webview.Core
1435   * @since 12
1436   */
1437  INPUT_TIMEOUT,
1438
1439  /**
1440   * Timeout for navigation commit.
1441   *
1442   * @syscap SystemCapability.Web.Webview.Core
1443   * @since 12
1444   */
1445  NAVIGATION_COMMIT_TIMEOUT,
1446}
1447
1448/**
1449 * Encompassed message information as parameters to {@link onFileSelectorShow} method.
1450 *
1451 * @syscap SystemCapability.Web.Webview.Core
1452 * @since 9
1453 */
1454/**
1455 * Encompassed message information as parameters to {@link onFileSelectorShow} method.
1456 *
1457 * @syscap SystemCapability.Web.Webview.Core
1458 * @crossplatform
1459 * @atomicservice
1460 * @since 11
1461 */
1462declare class FileSelectorParam {
1463  /**
1464   * Constructor.
1465   *
1466   * @syscap SystemCapability.Web.Webview.Core
1467   * @since 9
1468   */
1469  /**
1470   * Constructor.
1471   *
1472   * @syscap SystemCapability.Web.Webview.Core
1473   * @crossplatform
1474   * @atomicservice
1475   * @since 11
1476   */
1477  constructor();
1478
1479  /**
1480    * Gets the title of this file selector.
1481    * @returns { string } Return the title of this file selector.
1482    * @syscap SystemCapability.Web.Webview.Core
1483    * @since 9
1484    */
1485  /**
1486    * Gets the title of this file selector.
1487    * @returns { string } Return the title of this file selector.
1488    * @syscap SystemCapability.Web.Webview.Core
1489    * @crossplatform
1490    * @atomicservice
1491    * @since 11
1492    */
1493  getTitle(): string;
1494
1495  /**
1496    * Gets the FileSelectorMode of this file selector.
1497    * @returns { FileSelectorMode } Return the FileSelectorMode of this file selector.
1498    * @syscap SystemCapability.Web.Webview.Core
1499    * @since 9
1500    */
1501  /**
1502    * Gets the FileSelectorMode of this file selector.
1503    * @returns { FileSelectorMode } Return the FileSelectorMode of this file selector.
1504    * @syscap SystemCapability.Web.Webview.Core
1505    * @crossplatform
1506    * @atomicservice
1507    * @since 11
1508    */
1509  getMode(): FileSelectorMode;
1510
1511  /**
1512    * Gets an array of acceptable MIME type.
1513    * @returns { Array<string> } Return an array of acceptable MIME type.
1514    * @syscap SystemCapability.Web.Webview.Core
1515    * @since 9
1516    */
1517  /**
1518    * Gets an array of acceptable MIME type.
1519    * @returns { Array<string> } Return an array of acceptable MIME type.
1520    * @syscap SystemCapability.Web.Webview.Core
1521    * @crossplatform
1522    * @atomicservice
1523    * @since 11
1524    */
1525  getAcceptType(): Array<string>;
1526
1527  /**
1528   * Gets whether this file selector use a live media captured value.
1529   *
1530   * @returns { boolean } Return {@code true} if captured media; return {@code false} otherwise.
1531   * @syscap SystemCapability.Web.Webview.Core
1532   * @since 9
1533   */
1534  /**
1535   * Gets whether this file selector use a live media captured value.
1536   *
1537   * @returns { boolean } Return {@code true} if captured media; return {@code false} otherwise.
1538   * @syscap SystemCapability.Web.Webview.Core
1539   * @crossplatform
1540   * @atomicservice
1541   * @since 11
1542   */
1543  isCapture(): boolean;
1544}
1545
1546/**
1547 * Defines the js result.
1548 *
1549 * @syscap SystemCapability.Web.Webview.Core
1550 * @since 8
1551 */
1552/**
1553 * Defines the js result.
1554 *
1555 * @syscap SystemCapability.Web.Webview.Core
1556 * @crossplatform
1557 * @atomicservice
1558 * @since 11
1559 */
1560declare class JsResult {
1561  /**
1562   * Constructor.
1563   *
1564   * @syscap SystemCapability.Web.Webview.Core
1565   * @since 8
1566   */
1567  /**
1568   * Constructor.
1569   *
1570   * @syscap SystemCapability.Web.Webview.Core
1571   * @crossplatform
1572   * @atomicservice
1573   * @since 11
1574   */
1575  constructor();
1576
1577  /**
1578   * Handle the user's JavaScript result if cancel the dialog.
1579   *
1580   * @syscap SystemCapability.Web.Webview.Core
1581   * @since 8
1582   */
1583  /**
1584   * Handle the user's JavaScript result if cancel the dialog.
1585   *
1586   * @syscap SystemCapability.Web.Webview.Core
1587   * @crossplatform
1588   * @atomicservice
1589   * @since 11
1590   */
1591  handleCancel(): void;
1592
1593  /**
1594   * Handle the user's JavaScript result if confirm the dialog.
1595   *
1596   * @syscap SystemCapability.Web.Webview.Core
1597   * @since 8
1598   */
1599  /**
1600   * Handle the user's JavaScript result if confirm the dialog.
1601   *
1602   * @syscap SystemCapability.Web.Webview.Core
1603   * @crossplatform
1604   * @atomicservice
1605   * @since 11
1606   */
1607  handleConfirm(): void;
1608
1609  /**
1610   * Handle the user's JavaScript result if confirm the prompt dialog.
1611   *
1612   * @param { string } result
1613   * @syscap SystemCapability.Web.Webview.Core
1614   * @since 9
1615   */
1616  /**
1617   * Handle the user's JavaScript result if confirm the prompt dialog.
1618   *
1619   * @param { string } result
1620   * @syscap SystemCapability.Web.Webview.Core
1621   * @crossplatform
1622   * @atomicservice
1623   * @since 11
1624   */
1625  handlePromptConfirm(result: string): void;
1626}
1627
1628/**
1629 * Defines the file selector result, related to {@link onFileSelectorShow} method.
1630 *
1631 * @syscap SystemCapability.Web.Webview.Core
1632 * @since 9
1633 */
1634/**
1635 * Defines the file selector result, related to {@link onFileSelectorShow} method.
1636 *
1637 * @syscap SystemCapability.Web.Webview.Core
1638 * @crossplatform
1639 * @atomicservice
1640 * @since 11
1641 */
1642declare class FileSelectorResult {
1643  /**
1644   * Constructor.
1645   *
1646   * @syscap SystemCapability.Web.Webview.Core
1647   * @since 9
1648   */
1649  /**
1650   * Constructor.
1651   *
1652   * @syscap SystemCapability.Web.Webview.Core
1653   * @crossplatform
1654   * @atomicservice
1655   * @since 11
1656   */
1657  constructor();
1658
1659  /**
1660   * select a list of files.
1661   *
1662   * @param { Array<string> } fileList
1663   * @syscap SystemCapability.Web.Webview.Core
1664   * @since 9
1665   */
1666  /**
1667   * select a list of files.
1668   *
1669   * @param { Array<string> } fileList
1670   * @syscap SystemCapability.Web.Webview.Core
1671   * @crossplatform
1672   * @atomicservice
1673   * @since 11
1674   */
1675  handleFileList(fileList: Array<string>): void;
1676}
1677
1678/**
1679 * Defines the http auth request result, related to {@link onHttpAuthRequest} method.
1680 *
1681 * @syscap SystemCapability.Web.Webview.Core
1682 * @since 9
1683 */
1684/**
1685 * Defines the http auth request result, related to {@link onHttpAuthRequest} method.
1686 *
1687 * @syscap SystemCapability.Web.Webview.Core
1688 * @crossplatform
1689 * @atomicservice
1690 * @since 11
1691 */
1692declare class HttpAuthHandler {
1693  /**
1694   * Constructor.
1695   *
1696   * @syscap SystemCapability.Web.Webview.Core
1697   * @since 9
1698   */
1699  /**
1700   * Constructor.
1701   *
1702   * @syscap SystemCapability.Web.Webview.Core
1703   * @crossplatform
1704   * @atomicservice
1705   * @since 11
1706   */
1707  constructor();
1708
1709  /**
1710   * confirm.
1711   *
1712   * @param { string } userName
1713   * @param { string } password
1714   * @returns { boolean }
1715   * @syscap SystemCapability.Web.Webview.Core
1716   * @since 9
1717   */
1718  /**
1719   * confirm.
1720   *
1721   * @param { string } userName
1722   * @param { string } password
1723   * @returns { boolean }
1724   * @syscap SystemCapability.Web.Webview.Core
1725   * @crossplatform
1726   * @atomicservice
1727   * @since 11
1728   */
1729  confirm(userName: string, password: string): boolean;
1730
1731  /**
1732   * cancel.
1733   *
1734   * @syscap SystemCapability.Web.Webview.Core
1735   * @since 9
1736   */
1737  /**
1738   * cancel.
1739   *
1740   * @syscap SystemCapability.Web.Webview.Core
1741   * @crossplatform
1742   * @atomicservice
1743   * @since 11
1744   */
1745  cancel(): void;
1746
1747  /**
1748   * isHttpAuthInfoSaved.
1749   *
1750   * @returns { boolean }
1751   * @syscap SystemCapability.Web.Webview.Core
1752   * @since 9
1753   */
1754  /**
1755   * isHttpAuthInfoSaved.
1756   *
1757   * @returns { boolean }
1758   * @syscap SystemCapability.Web.Webview.Core
1759   * @crossplatform
1760   * @atomicservice
1761   * @since 11
1762   */
1763  isHttpAuthInfoSaved(): boolean;
1764}
1765
1766/**
1767 * Defines the ssl error request result, related to {@link onSslErrorEventReceive} method.
1768 *
1769 * @syscap SystemCapability.Web.Webview.Core
1770 * @since 9
1771 */
1772/**
1773 * Defines the ssl error request result, related to {@link onSslErrorEventReceive} method.
1774 *
1775 * @syscap SystemCapability.Web.Webview.Core
1776 * @atomicservice
1777 * @since 11
1778 */
1779declare class SslErrorHandler {
1780  /**
1781   * Constructor.
1782   *
1783   * @syscap SystemCapability.Web.Webview.Core
1784   * @since 9
1785   */
1786  /**
1787   * Constructor.
1788   *
1789   * @syscap SystemCapability.Web.Webview.Core
1790   * @atomicservice
1791   * @since 11
1792   */
1793  constructor();
1794
1795  /**
1796   * Confirm to use the SSL certificate.
1797   *
1798   * @syscap SystemCapability.Web.Webview.Core
1799   * @since 9
1800   */
1801  /**
1802   * Confirm to use the SSL certificate.
1803   *
1804   * @syscap SystemCapability.Web.Webview.Core
1805   * @atomicservice
1806   * @since 11
1807   */
1808  handleConfirm(): void;
1809
1810  /**
1811   * Cancel this request.
1812   *
1813   * @syscap SystemCapability.Web.Webview.Core
1814   * @since 9
1815   */
1816  /**
1817   * Cancel this request.
1818   *
1819   * @syscap SystemCapability.Web.Webview.Core
1820   * @atomicservice
1821   * @since 11
1822   */
1823  handleCancel(): void;
1824}
1825
1826/**
1827 * Defines the client certificate request result, related to {@link onClientAuthenticationRequest} method.
1828 *
1829 * @syscap SystemCapability.Web.Webview.Core
1830 * @since 9
1831 */
1832/**
1833 * Defines the client certificate request result, related to {@link onClientAuthenticationRequest} method.
1834 *
1835 * @syscap SystemCapability.Web.Webview.Core
1836 * @atomicservice
1837 * @since 11
1838 */
1839declare class ClientAuthenticationHandler {
1840  /**
1841   * Constructor.
1842   *
1843   * @syscap SystemCapability.Web.Webview.Core
1844   * @since 9
1845   */
1846  /**
1847   * Constructor.
1848   *
1849   * @syscap SystemCapability.Web.Webview.Core
1850   * @atomicservice
1851   * @since 11
1852   */
1853  constructor();
1854
1855  /**
1856   * Confirm to use the specified private key and client certificate chain.
1857   *
1858   * @param { string } priKeyFile - The file that store private key.
1859   * @param { string } certChainFile - The file that store client certificate chain.
1860   * @syscap SystemCapability.Web.Webview.Core
1861   * @since 9
1862   */
1863  /**
1864   * Confirm to use the specified private key and client certificate chain.
1865   *
1866   * @param { string } priKeyFile - The file that store private key.
1867   * @param { string } certChainFile - The file that store client certificate chain.
1868   * @syscap SystemCapability.Web.Webview.Core
1869   * @atomicservice
1870   * @since 11
1871   */
1872  confirm(priKeyFile: string, certChainFile: string): void;
1873
1874  /**
1875   * Confirm to use the authUri.The authUri can be obtained from certificate management.
1876   *
1877   * @param { string } authUri is the key of credentials.The credentials contain sign info and client certificates info.
1878   * @syscap SystemCapability.Web.Webview.Core
1879   * @since 10
1880   */
1881  /**
1882   * Confirm to use the authUri.The authUri can be obtained from certificate management.
1883   *
1884   * @param { string } authUri is the key of credentials.The credentials contain sign info and client certificates info.
1885   * @syscap SystemCapability.Web.Webview.Core
1886   * @atomicservice
1887   * @since 11
1888   */
1889  confirm(authUri: string): void;
1890
1891  /**
1892   * Cancel this certificate request.
1893   *
1894   * @syscap SystemCapability.Web.Webview.Core
1895   * @since 9
1896   */
1897  /**
1898   * Cancel this certificate request.
1899   *
1900   * @syscap SystemCapability.Web.Webview.Core
1901   * @atomicservice
1902   * @since 11
1903   */
1904  cancel(): void;
1905
1906  /**
1907   * Ignore this certificate request temporarily.
1908   *
1909   * @syscap SystemCapability.Web.Webview.Core
1910   * @since 9
1911   */
1912  /**
1913   * Ignore this certificate request temporarily.
1914   *
1915   * @syscap SystemCapability.Web.Webview.Core
1916   * @atomicservice
1917   * @since 11
1918   */
1919  ignore(): void;
1920}
1921
1922/**
1923 * Defines the accessible resource type, related to {@link onPermissionRequest} method.
1924 *
1925 * @enum { string }
1926 * @syscap SystemCapability.Web.Webview.Core
1927 * @since 9
1928 */
1929/**
1930 * Defines the accessible resource type, related to {@link onPermissionRequest} method.
1931 *
1932 * @enum { string }
1933 * @syscap SystemCapability.Web.Webview.Core
1934 * @crossplatform
1935 * @atomicservice
1936 * @since 11
1937 */
1938declare enum ProtectedResourceType {
1939  /**
1940   * The MidiSysex resource.
1941   *
1942   * @syscap SystemCapability.Web.Webview.Core
1943   * @since 9
1944   */
1945  /**
1946   * The MidiSysex resource.
1947   *
1948   * @syscap SystemCapability.Web.Webview.Core
1949   * @atomicservice
1950   * @since 11
1951   */
1952  MidiSysex = 'TYPE_MIDI_SYSEX',
1953
1954  /**
1955   * The video capture resource, such as camera.
1956   *
1957   * @syscap SystemCapability.Web.Webview.Core
1958   * @since 10
1959   */
1960  /**
1961   * The video capture resource, such as camera.
1962   *
1963   * @syscap SystemCapability.Web.Webview.Core
1964   * @crossplatform
1965   * @atomicservice
1966   * @since 11
1967   */
1968  VIDEO_CAPTURE = 'TYPE_VIDEO_CAPTURE',
1969
1970  /**
1971   * The audio capture resource, such as microphone.
1972   *
1973   * @syscap SystemCapability.Web.Webview.Core
1974   * @since 10
1975   */
1976  /**
1977   * The audio capture resource, such as microphone.
1978   *
1979   * @syscap SystemCapability.Web.Webview.Core
1980   * @crossplatform
1981   * @atomicservice
1982   * @since 11
1983   */
1984  AUDIO_CAPTURE = 'TYPE_AUDIO_CAPTURE',
1985
1986  /**
1987   * The sensor resource, such as accelerometer.
1988   *
1989   * @syscap SystemCapability.Web.Webview.Core
1990   * @atomicservice
1991   * @since 12
1992   */
1993  SENSOR = 'TYPE_SENSOR'
1994}
1995
1996/**
1997 * Defines the onPermissionRequest callback, related to {@link onPermissionRequest} method.
1998 *
1999 * @syscap SystemCapability.Web.Webview.Core
2000 * @since 9
2001 */
2002/**
2003 * Defines the onPermissionRequest callback, related to {@link onPermissionRequest} method.
2004 *
2005 * @syscap SystemCapability.Web.Webview.Core
2006 * @crossplatform
2007 * @atomicservice
2008 * @since 11
2009 */
2010declare class PermissionRequest {
2011  /**
2012   * Constructor.
2013   *
2014   * @syscap SystemCapability.Web.Webview.Core
2015   * @since 9
2016   */
2017  /**
2018   * Constructor.
2019   *
2020   * @syscap SystemCapability.Web.Webview.Core
2021   * @crossplatform
2022   * @atomicservice
2023   * @since 11
2024   */
2025  constructor();
2026
2027  /**
2028   * Reject the request.
2029   *
2030   * @syscap SystemCapability.Web.Webview.Core
2031   * @since 9
2032   */
2033  /**
2034   * Reject the request.
2035   *
2036   * @syscap SystemCapability.Web.Webview.Core
2037   * @crossplatform
2038   * @atomicservice
2039   * @since 11
2040   */
2041  deny(): void;
2042
2043  /**
2044   * Gets the source if the webpage that attempted to access the restricted resource.
2045   *
2046   * @returns { string }
2047   * @syscap SystemCapability.Web.Webview.Core
2048   * @since 9
2049   */
2050  /**
2051   * Gets the source if the webpage that attempted to access the restricted resource.
2052   *
2053   * @returns { string }
2054   * @syscap SystemCapability.Web.Webview.Core
2055   * @crossplatform
2056   * @atomicservice
2057   * @since 11
2058   */
2059  getOrigin(): string;
2060
2061  /**
2062   * Gets the resource that the webpage is trying to access.
2063   *
2064   * @returns { Array<string> }
2065   * @syscap SystemCapability.Web.Webview.Core
2066   * @since 9
2067   */
2068  /**
2069   * Gets the resource that the webpage is trying to access.
2070   *
2071   * @returns { Array<string> }
2072   * @syscap SystemCapability.Web.Webview.Core
2073   * @crossplatform
2074   * @atomicservice
2075   * @since 11
2076   */
2077  getAccessibleResource(): Array<string>;
2078
2079  /**
2080   * Grant origin access to a given resource.
2081   *
2082   * @param { Array<string> } resources
2083   * @syscap SystemCapability.Web.Webview.Core
2084   * @since 9
2085   */
2086  /**
2087   * Grant origin access to a given resource.
2088   *
2089   * @param { Array<string> } resources
2090   * @syscap SystemCapability.Web.Webview.Core
2091   * @crossplatform
2092   * @atomicservice
2093   * @since 11
2094   */
2095  grant(resources: Array<string>): void;
2096}
2097
2098/**
2099 * Defines the onScreenCapture callback, related to {@link onScreenCapture} method.
2100 * @syscap SystemCapability.Web.Webview.Core
2101 * @since 10
2102 */
2103/**
2104 * Defines the onScreenCapture callback, related to {@link onScreenCapture} method.
2105 * @syscap SystemCapability.Web.Webview.Core
2106 * @atomicservice
2107 * @since 11
2108 */
2109declare class ScreenCaptureHandler {
2110  /**
2111   * Constructor.
2112   * @syscap SystemCapability.Web.Webview.Core
2113   * @since 10
2114   */
2115  /**
2116   * Constructor.
2117   * @syscap SystemCapability.Web.Webview.Core
2118   * @atomicservice
2119   * @since 11
2120   */
2121  constructor();
2122
2123  /**
2124   * Gets the source of the webpage that attempted to access the restricted resource.
2125   *
2126   * @returns { string }
2127   * @syscap SystemCapability.Web.Webview.Core
2128   * @since 10
2129   */
2130  /**
2131   * Gets the source of the webpage that attempted to access the restricted resource.
2132   *
2133   * @returns { string }
2134   * @syscap SystemCapability.Web.Webview.Core
2135   * @atomicservice
2136   * @since 11
2137   */
2138  getOrigin(): string;
2139
2140  /**
2141   * Grant origin access to a given resource.
2142   * @param { ScreenCaptureConfig } config The screen capture configuration.
2143   * @syscap SystemCapability.Web.Webview.Core
2144   * @since 10
2145   */
2146  /**
2147   * Grant origin access to a given resource.
2148   * @param { ScreenCaptureConfig } config The screen capture configuration.
2149   * @syscap SystemCapability.Web.Webview.Core
2150   * @atomicservice
2151   * @since 11
2152   */
2153  grant(config: ScreenCaptureConfig): void;
2154
2155  /**
2156   * Reject the request.
2157   * @syscap SystemCapability.Web.Webview.Core
2158   * @since 10
2159   */
2160  /**
2161   * Reject the request.
2162   * @syscap SystemCapability.Web.Webview.Core
2163   * @atomicservice
2164   * @since 11
2165   */
2166  deny(): void;
2167}
2168
2169/**
2170 * Defines the onDataResubmission callback, related to {@link onDataResubmission} method.
2171 *
2172 * @syscap SystemCapability.Web.Webview.Core
2173 * @since 9
2174 */
2175/**
2176 * Defines the onDataResubmission callback, related to {@link onDataResubmission} method.
2177 *
2178 * @syscap SystemCapability.Web.Webview.Core
2179 * @atomicservice
2180 * @since 11
2181 */
2182declare class DataResubmissionHandler {
2183  /**
2184   * Constructor.
2185   *
2186   * @syscap SystemCapability.Web.Webview.Core
2187   * @since 9
2188   */
2189  /**
2190   * Constructor.
2191   *
2192   * @syscap SystemCapability.Web.Webview.Core
2193   * @atomicservice
2194   * @since 11
2195   */
2196  constructor();
2197
2198  /**
2199   * Resend related form data.
2200   *
2201   * @syscap SystemCapability.Web.Webview.Core
2202   * @since 9
2203   */
2204  /**
2205   * Resend related form data.
2206   *
2207   * @syscap SystemCapability.Web.Webview.Core
2208   * @atomicservice
2209   * @since 11
2210   */
2211  resend(): void;
2212
2213  /**
2214   * Do not resend related form data.
2215   *
2216   * @syscap SystemCapability.Web.Webview.Core
2217   * @since 9
2218   */
2219  /**
2220   * Do not resend related form data.
2221   *
2222   * @syscap SystemCapability.Web.Webview.Core
2223   * @atomicservice
2224   * @since 11
2225   */
2226  cancel(): void;
2227}
2228
2229/**
2230 * Defines the onWindowNew callback, related to {@link onWindowNew} method.
2231 *
2232 * @syscap SystemCapability.Web.Webview.Core
2233 * @since 9
2234 */
2235/**
2236 * Defines the onWindowNew callback, related to {@link onWindowNew} method.
2237 *
2238 * @syscap SystemCapability.Web.Webview.Core
2239 * @atomicservice
2240 * @since 11
2241 */
2242declare class ControllerHandler {
2243  /**
2244   * Constructor.
2245   *
2246   * @syscap SystemCapability.Web.Webview.Core
2247   * @since 9
2248   */
2249  /**
2250   * Constructor.
2251   *
2252   * @syscap SystemCapability.Web.Webview.Core
2253   * @atomicservice
2254   * @since 11
2255   */
2256  constructor();
2257
2258  /**
2259   * Set WebController object.
2260   *
2261   * @param { WebviewController } controller
2262   * @syscap SystemCapability.Web.Webview.Core
2263   * @since 9
2264   */
2265  /**
2266   * Set WebController object.
2267   *
2268   * @param { WebviewController } controller
2269   * @syscap SystemCapability.Web.Webview.Core
2270   * @atomicservice
2271   * @since 11
2272   */
2273  setWebController(controller: WebviewController): void;
2274}
2275
2276/**
2277 * Defines the context menu source type, related to {@link onContextMenuShow} method.
2278 *
2279 * @enum { number }
2280 * @syscap SystemCapability.Web.Webview.Core
2281 * @since 9
2282 */
2283/**
2284 * Defines the context menu source type, related to {@link onContextMenuShow} method.
2285 *
2286 * @enum { number }
2287 * @syscap SystemCapability.Web.Webview.Core
2288 * @atomicservice
2289 * @since 11
2290 */
2291declare enum ContextMenuSourceType {
2292  /**
2293   * Other source types.
2294   *
2295   * @syscap SystemCapability.Web.Webview.Core
2296   * @since 9
2297   */
2298  /**
2299   * Other source types.
2300   *
2301   * @syscap SystemCapability.Web.Webview.Core
2302   * @atomicservice
2303   * @since 11
2304   */
2305  None,
2306
2307  /**
2308   * Mouse.
2309   *
2310   * @syscap SystemCapability.Web.Webview.Core
2311   * @since 9
2312   */
2313  /**
2314   * Mouse.
2315   *
2316   * @syscap SystemCapability.Web.Webview.Core
2317   * @atomicservice
2318   * @since 11
2319   */
2320  Mouse,
2321
2322  /**
2323   * Long press.
2324   *
2325   * @syscap SystemCapability.Web.Webview.Core
2326   * @since 9
2327   */
2328  /**
2329   * Long press.
2330   *
2331   * @syscap SystemCapability.Web.Webview.Core
2332   * @atomicservice
2333   * @since 11
2334   */
2335  LongPress,
2336}
2337
2338/**
2339 * Defines the context menu media type, related to {@link onContextMenuShow} method.
2340 *
2341 * @enum { number }
2342 * @syscap SystemCapability.Web.Webview.Core
2343 * @since 9
2344 */
2345/**
2346 * Defines the context menu media type, related to {@link onContextMenuShow} method.
2347 *
2348 * @enum { number }
2349 * @syscap SystemCapability.Web.Webview.Core
2350 * @atomicservice
2351 * @since 11
2352 */
2353declare enum ContextMenuMediaType {
2354  /**
2355   * Not a special node or other media types.
2356   *
2357   * @syscap SystemCapability.Web.Webview.Core
2358   * @since 9
2359   */
2360  /**
2361   * Not a special node or other media types.
2362   *
2363   * @syscap SystemCapability.Web.Webview.Core
2364   * @atomicservice
2365   * @since 11
2366   */
2367  None,
2368
2369  /**
2370   * Image.
2371   *
2372   * @syscap SystemCapability.Web.Webview.Core
2373   * @since 9
2374   */
2375  /**
2376   * Image.
2377   *
2378   * @syscap SystemCapability.Web.Webview.Core
2379   * @atomicservice
2380   * @since 11
2381   */
2382  Image,
2383}
2384
2385/**
2386 * Defines the context menu input field type, related to {@link onContextMenuShow} method.
2387 *
2388 * @enum { number }
2389 * @syscap SystemCapability.Web.Webview.Core
2390 * @since 9
2391 */
2392/**
2393 * Defines the context menu input field type, related to {@link onContextMenuShow} method.
2394 *
2395 * @enum { number }
2396 * @syscap SystemCapability.Web.Webview.Core
2397 * @atomicservice
2398 * @since 11
2399 */
2400declare enum ContextMenuInputFieldType {
2401  /**
2402   * Not an input field.
2403   *
2404   * @syscap SystemCapability.Web.Webview.Core
2405   * @since 9
2406   */
2407  /**
2408   * Not an input field.
2409   *
2410   * @syscap SystemCapability.Web.Webview.Core
2411   * @atomicservice
2412   * @since 11
2413   */
2414  None,
2415
2416  /**
2417   * The plain text type.
2418   *
2419   * @syscap SystemCapability.Web.Webview.Core
2420   * @since 9
2421   */
2422  /**
2423   * The plain text type.
2424   *
2425   * @syscap SystemCapability.Web.Webview.Core
2426   * @atomicservice
2427   * @since 11
2428   */
2429  PlainText,
2430
2431  /**
2432   * The password type.
2433   *
2434   * @syscap SystemCapability.Web.Webview.Core
2435   * @since 9
2436   */
2437  /**
2438   * The password type.
2439   *
2440   * @syscap SystemCapability.Web.Webview.Core
2441   * @atomicservice
2442   * @since 11
2443   */
2444  Password,
2445
2446  /**
2447   * The number type.
2448   *
2449   * @syscap SystemCapability.Web.Webview.Core
2450   * @since 9
2451   */
2452  /**
2453   * The number type.
2454   *
2455   * @syscap SystemCapability.Web.Webview.Core
2456   * @atomicservice
2457   * @since 11
2458   */
2459  Number,
2460
2461  /**
2462   * The telephone type.
2463   *
2464   * @syscap SystemCapability.Web.Webview.Core
2465   * @since 9
2466   */
2467  /**
2468   * The telephone type.
2469   *
2470   * @syscap SystemCapability.Web.Webview.Core
2471   * @atomicservice
2472   * @since 11
2473   */
2474  Telephone,
2475
2476  /**
2477   * Other types.
2478   *
2479   * @syscap SystemCapability.Web.Webview.Core
2480   * @since 9
2481   */
2482  /**
2483   * Other types.
2484   *
2485   * @syscap SystemCapability.Web.Webview.Core
2486   * @atomicservice
2487   * @since 11
2488   */
2489  Other,
2490}
2491
2492/**
2493 * Defines the embed status, related to {@link NativeEmbedDataInfo}.
2494 *
2495 * @enum { number }
2496 * @syscap SystemCapability.Web.Webview.Core
2497 * @atomicservice
2498 * @since 11
2499 */
2500declare enum NativeEmbedStatus {
2501
2502  /**
2503   * The embed tag create.
2504   *
2505   * @syscap SystemCapability.Web.Webview.Core
2506   * @atomicservice
2507   * @since 11
2508   */
2509  CREATE = 0,
2510
2511  /**
2512   * The embed tag update.
2513   *
2514   * @syscap SystemCapability.Web.Webview.Core
2515   * @atomicservice
2516   * @since 11
2517   */
2518  UPDATE = 1,
2519
2520  /**
2521   * The embed tag destroy.
2522   *
2523   * @syscap SystemCapability.Web.Webview.Core
2524   * @atomicservice
2525   * @since 11
2526   */
2527  DESTROY = 2,
2528
2529  /**
2530   * The embed tag enter backforward cache.
2531   *
2532   * @syscap SystemCapability.Web.Webview.Core
2533   * @atomicservice
2534   * @since 12
2535   */
2536  ENTER_BFCACHE = 3,
2537
2538  /**
2539   * The embed tag leave backforward cache.
2540   *
2541   * @syscap SystemCapability.Web.Webview.Core
2542   * @atomicservice
2543   * @since 12
2544   */
2545  LEAVE_BFCACHE = 4,
2546}
2547
2548/**
2549 * Defines the context menu supported event bit flags, related to {@link onContextMenuShow} method.
2550 *
2551 * @enum { number }
2552 * @syscap SystemCapability.Web.Webview.Core
2553 * @since 9
2554 */
2555/**
2556 * Defines the context menu supported event bit flags, related to {@link onContextMenuShow} method.
2557 *
2558 * @enum { number }
2559 * @syscap SystemCapability.Web.Webview.Core
2560 * @atomicservice
2561 * @since 11
2562 */
2563declare enum ContextMenuEditStateFlags {
2564  /**
2565   * Not editable.
2566   *
2567   * @syscap SystemCapability.Web.Webview.Core
2568   * @since 9
2569   */
2570  /**
2571   * Not editable.
2572   *
2573   * @syscap SystemCapability.Web.Webview.Core
2574   * @atomicservice
2575   * @since 11
2576   */
2577  NONE = 0,
2578  /**
2579   * Clipping is supported.
2580   *
2581   * @syscap SystemCapability.Web.Webview.Core
2582   * @since 9
2583   */
2584  /**
2585   * Clipping is supported.
2586   *
2587   * @syscap SystemCapability.Web.Webview.Core
2588   * @atomicservice
2589   * @since 11
2590   */
2591  CAN_CUT = 1 << 0,
2592  /**
2593   * Copies are supported.
2594   *
2595   * @syscap SystemCapability.Web.Webview.Core
2596   * @since 9
2597   */
2598  /**
2599   * Copies are supported.
2600   *
2601   * @syscap SystemCapability.Web.Webview.Core
2602   * @atomicservice
2603   * @since 11
2604   */
2605  CAN_COPY = 1 << 1,
2606  /**
2607   * Support for pasting.
2608   *
2609   * @syscap SystemCapability.Web.Webview.Core
2610   * @since 9
2611   */
2612  /**
2613   * Support for pasting.
2614   *
2615   * @syscap SystemCapability.Web.Webview.Core
2616   * @atomicservice
2617   * @since 11
2618   */
2619  CAN_PASTE = 1 << 2,
2620  /**
2621   * Select all is supported.
2622   *
2623   * @syscap SystemCapability.Web.Webview.Core
2624   * @since 9
2625   */
2626  /**
2627   * Select all is supported.
2628   *
2629   * @syscap SystemCapability.Web.Webview.Core
2630   * @atomicservice
2631   * @since 11
2632   */
2633  CAN_SELECT_ALL = 1 << 3,
2634}
2635
2636/**
2637 * Enum type supplied to {@link navigationType} for the navigation's type.
2638 *
2639 * @enum { number }
2640 * @syscap SystemCapability.Web.Webview.Core
2641 * @atomicservice
2642 * @since 11
2643 */
2644declare enum WebNavigationType {
2645  /**
2646   * Unknown type.
2647   *
2648   * @syscap SystemCapability.Web.Webview.Core
2649   * @atomicservice
2650   * @since 11
2651   */
2652  UNKNOWN = 0,
2653
2654  /**
2655   * A new entry was created due to a navigation happened on the main frame.
2656   * Contains all situations that will generate a mainframe navigation entry,
2657   * which means that navigations to a hash on the same document or history.pushState
2658   * also belong to this type.
2659   *
2660   * @syscap SystemCapability.Web.Webview.Core
2661   * @atomicservice
2662   * @since 11
2663   */
2664  MAIN_FRAME_NEW_ENTRY = 1,
2665
2666  /**
2667   * Navigate to an existing entry due to a navigation on the main frame.
2668   * e.g.
2669   *   1. History navigations.
2670   *   2. Reloads (contains loading the same url).
2671   *   3. Same-document navigations(history.replaceState(), location.replace()).
2672   *
2673   * @syscap SystemCapability.Web.Webview.Core
2674   * @atomicservice
2675   * @since 11
2676   */
2677  MAIN_FRAME_EXISTING_ENTRY = 2,
2678
2679  /**
2680   * A navigation happened on subframe which was triggered by user.
2681   *
2682   * @syscap SystemCapability.Web.Webview.Core
2683   * @atomicservice
2684   * @since 11
2685   */
2686  NAVIGATION_TYPE_NEW_SUBFRAME = 4,
2687
2688  /**
2689   * A navigation happened on the subframe automatically.
2690   *
2691   * @syscap SystemCapability.Web.Webview.Core
2692   * @atomicservice
2693   * @since 11
2694   */
2695  NAVIGATION_TYPE_AUTO_SUBFRAME = 5,
2696}
2697
2698
2699/**
2700 * Defines the web render mode, related to {@link RenderMode}.
2701 *
2702 * @enum { number }
2703 * @syscap SystemCapability.Web.Webview.Core
2704 * @atomicservice
2705 * @since 12
2706 */
2707declare enum RenderMode {
2708  /**
2709   * Web and arkui render asynchronously
2710   *
2711   * @syscap SystemCapability.Web.Webview.Core
2712   * @atomicservice
2713   * @since 12
2714   */
2715  ASYNC_RENDER = 0,
2716
2717  /**
2718   * Web and arkui render synchronously
2719   *
2720   * @syscap SystemCapability.Web.Webview.Core
2721   * @atomicservice
2722   * @since 12
2723   */
2724  SYNC_RENDER = 1,
2725}
2726
2727/**
2728 * Defines the viewport-fit type, related to {@link ViewportFit}.
2729 *
2730 * @enum { number }
2731 * @syscap SystemCapability.Web.Webview.Core
2732 * @atomicservice
2733 * @since 12
2734 */
2735declare enum ViewportFit {
2736  /**
2737   * No effect - the whole web page is viewable(default)
2738   *
2739   * @syscap SystemCapability.Web.Webview.Core
2740   * @atomicservice
2741   * @since 12
2742   */
2743  AUTO = 0,
2744
2745  /**
2746   * The initial layout viewport and the visual viewport are set to the
2747   * largest rectangle which is inscribe in the display of the device.
2748   *
2749   * @syscap SystemCapability.Web.Webview.Core
2750   * @atomicservice
2751   * @since 12
2752   */
2753  CONTAINS = 1,
2754
2755  /**
2756   * The initial layout viewport and the visual viewport are set to the
2757   * circumscribe rectangle of the physical screen of the device.
2758   *
2759   * @syscap SystemCapability.Web.Webview.Core
2760   * @atomicservice
2761   * @since 12
2762   */
2763  COVER = 2,
2764}
2765
2766/**
2767 * Defines the context menu param, related to {@link WebContextMenuParam} method.
2768 *
2769 * @syscap SystemCapability.Web.Webview.Core
2770 * @since 9
2771 */
2772/**
2773 * Defines the context menu param, related to {@link WebContextMenuParam} method.
2774 *
2775 * @syscap SystemCapability.Web.Webview.Core
2776 * @atomicservice
2777 * @since 11
2778 */
2779declare class WebContextMenuParam {
2780  /**
2781   * Constructor.
2782   *
2783   * @syscap SystemCapability.Web.Webview.Core
2784   * @since 9
2785   */
2786  /**
2787   * Constructor.
2788   *
2789   * @syscap SystemCapability.Web.Webview.Core
2790   * @atomicservice
2791   * @since 11
2792   */
2793  constructor();
2794
2795  /**
2796   * Horizontal offset coordinates of the menu within the Web component.
2797   *
2798   * @returns { number } The context menu x coordinate.
2799   * @syscap SystemCapability.Web.Webview.Core
2800   * @since 9
2801   */
2802  /**
2803   * Horizontal offset coordinates of the menu within the Web component.
2804   *
2805   * @returns { number } The context menu x coordinate.
2806   * @syscap SystemCapability.Web.Webview.Core
2807   * @atomicservice
2808   * @since 11
2809   */
2810  x(): number;
2811
2812  /**
2813   * Vertical offset coordinates for the menu within the Web component.
2814   *
2815   * @returns { number } The context menu y coordinate.
2816   * @syscap SystemCapability.Web.Webview.Core
2817   * @since 9
2818   */
2819  /**
2820   * Vertical offset coordinates for the menu within the Web component.
2821   *
2822   * @returns { number } The context menu y coordinate.
2823   * @syscap SystemCapability.Web.Webview.Core
2824   * @atomicservice
2825   * @since 11
2826   */
2827  y(): number;
2828
2829  /**
2830   * If the long-press location is the link returns the link's security-checked URL.
2831   *
2832   * @returns { string } If relate to a link return link url, else return null.
2833   * @syscap SystemCapability.Web.Webview.Core
2834   * @since 9
2835   */
2836  /**
2837   * If the long-press location is the link returns the link's security-checked URL.
2838   *
2839   * @returns { string } If relate to a link return link url, else return null.
2840   * @syscap SystemCapability.Web.Webview.Core
2841   * @atomicservice
2842   * @since 11
2843   */
2844  getLinkUrl(): string;
2845
2846  /**
2847   * If the long-press location is the link returns the link's original URL.
2848   *
2849   * @returns { string } If relate to a link return unfiltered link url, else return null.
2850   * @syscap SystemCapability.Web.Webview.Core
2851   * @since 9
2852   */
2853  /**
2854   * If the long-press location is the link returns the link's original URL.
2855   *
2856   * @returns { string } If relate to a link return unfiltered link url, else return null.
2857   * @syscap SystemCapability.Web.Webview.Core
2858   * @atomicservice
2859   * @since 11
2860   */
2861  getUnfilteredLinkUrl(): string;
2862
2863  /**
2864   * Returns the SRC URL if the selected element has a SRC attribute.
2865   *
2866   * @returns { string } If this context menu is "src" attribute, return link url, else return null.
2867   * @syscap SystemCapability.Web.Webview.Core
2868   * @since 9
2869   */
2870  /**
2871   * Returns the SRC URL if the selected element has a SRC attribute.
2872   *
2873   * @returns { string } If this context menu is "src" attribute, return link url, else return null.
2874   * @syscap SystemCapability.Web.Webview.Core
2875   * @atomicservice
2876   * @since 11
2877   */
2878  getSourceUrl(): string;
2879
2880  /**
2881   * Long press menu location has image content.
2882   *
2883   * @returns { boolean } Return whether this context menu has image content.
2884   * @syscap SystemCapability.Web.Webview.Core
2885   * @since 9
2886   */
2887  /**
2888   * Long press menu location has image content.
2889   *
2890   * @returns { boolean } Return whether this context menu has image content.
2891   * @syscap SystemCapability.Web.Webview.Core
2892   * @atomicservice
2893   * @since 11
2894   */
2895  existsImageContents(): boolean;
2896
2897  /**
2898   * Returns the type of context node.
2899   *
2900   * @returns { ContextMenuMediaType } Returns the type of context node.
2901   * @syscap SystemCapability.Web.Webview.Core
2902   * @since 9
2903   */
2904  /**
2905   * Returns the type of context node.
2906   *
2907   * @returns { ContextMenuMediaType } Returns the type of context node.
2908   * @syscap SystemCapability.Web.Webview.Core
2909   * @atomicservice
2910   * @since 11
2911   */
2912  getMediaType(): ContextMenuMediaType;
2913
2914  /**
2915   * Returns the text of the selection.
2916   *
2917   * @returns { string } Returns the text of the selection.
2918   * @syscap SystemCapability.Web.Webview.Core
2919   * @since 9
2920   */
2921  /**
2922   * Returns the text of the selection.
2923   *
2924   * @returns { string } Returns the text of the selection.
2925   * @syscap SystemCapability.Web.Webview.Core
2926   * @atomicservice
2927   * @since 11
2928   */
2929  getSelectionText(): string;
2930
2931  /**
2932   * Returns the context menu source type.
2933   *
2934   * @returns { ContextMenuSourceType }
2935   * @syscap SystemCapability.Web.Webview.Core
2936   * @since 9
2937   */
2938  /**
2939   * Returns the context menu source type.
2940   *
2941   * @returns { ContextMenuSourceType }
2942   * @syscap SystemCapability.Web.Webview.Core
2943   * @atomicservice
2944   * @since 11
2945   */
2946  getSourceType(): ContextMenuSourceType;
2947
2948  /**
2949   * Returns input field type if the context menu was invoked on an input field.
2950   *
2951   * @returns { ContextMenuInputFieldType } Input field type if the context menu was invoked on an input field.
2952   * @syscap SystemCapability.Web.Webview.Core
2953   * @since 9
2954   */
2955  /**
2956   * Returns input field type if the context menu was invoked on an input field.
2957   *
2958   * @returns { ContextMenuInputFieldType } Input field type if the context menu was invoked on an input field.
2959   * @syscap SystemCapability.Web.Webview.Core
2960   * @atomicservice
2961   * @since 11
2962   */
2963  getInputFieldType(): ContextMenuInputFieldType;
2964
2965  /**
2966   * Returns whether the context is editable.
2967   *
2968   * @returns { boolean }
2969   * @syscap SystemCapability.Web.Webview.Core
2970   * @since 9
2971   */
2972  /**
2973   * Returns whether the context is editable.
2974   *
2975   * @returns { boolean }
2976   * @syscap SystemCapability.Web.Webview.Core
2977   * @atomicservice
2978   * @since 11
2979   */
2980  isEditable(): boolean;
2981
2982  /**
2983   * Returns the context editable flags {@link ContextMenuEditStateFlags}.
2984   *
2985   * @returns { number }
2986   * @syscap SystemCapability.Web.Webview.Core
2987   * @since 9
2988   */
2989  /**
2990   * Returns the context editable flags {@link ContextMenuEditStateFlags}.
2991   *
2992   * @returns { number }
2993   * @syscap SystemCapability.Web.Webview.Core
2994   * @atomicservice
2995   * @since 11
2996   */
2997  getEditStateFlags(): number;
2998
2999  /**
3000   * Returns the selection menu preview width.
3001   *
3002   * @returns { number } The preview menu width.
3003   * @syscap SystemCapability.Web.Webview.Core
3004   * @since 13
3005   */
3006  getPreviewWidth(): number;
3007
3008  /**
3009   * Returns the selection menu preview height.
3010   *
3011   * @returns { number } The preview menu height.
3012   * @syscap SystemCapability.Web.Webview.Core
3013   * @since 13
3014   */
3015  getPreviewHeight(): number;
3016}
3017
3018/**
3019 * Defines the context menu result, related to {@link WebContextMenuResult} method.
3020 *
3021 * @syscap SystemCapability.Web.Webview.Core
3022 * @since 9
3023 */
3024/**
3025 * Defines the context menu result, related to {@link WebContextMenuResult} method.
3026 *
3027 * @syscap SystemCapability.Web.Webview.Core
3028 * @atomicservice
3029 * @since 11
3030 */
3031declare class WebContextMenuResult {
3032  /**
3033   * Constructor.
3034   *
3035   * @syscap SystemCapability.Web.Webview.Core
3036   * @since 9
3037   */
3038  /**
3039   * Constructor.
3040   *
3041   * @syscap SystemCapability.Web.Webview.Core
3042   * @atomicservice
3043   * @since 11
3044   */
3045  constructor();
3046
3047  /**
3048   * When close context menu without other call in WebContextMenuResult,
3049   * User should call this function to close menu
3050   *
3051   * @syscap SystemCapability.Web.Webview.Core
3052   * @since 9
3053   */
3054  /**
3055   * When close context menu without other call in WebContextMenuResult,
3056   * User should call this function to close menu
3057   *
3058   * @syscap SystemCapability.Web.Webview.Core
3059   * @atomicservice
3060   * @since 11
3061   */
3062  closeContextMenu(): void;
3063
3064  /**
3065   * If WebContextMenuParam has image content, this function will copy image related to this context menu.
3066   * If WebContextMenuParam has no image content, this function will do nothing.
3067   *
3068   * @syscap SystemCapability.Web.Webview.Core
3069   * @since 9
3070   */
3071  /**
3072   * If WebContextMenuParam has image content, this function will copy image related to this context menu.
3073   * If WebContextMenuParam has no image content, this function will do nothing.
3074   *
3075   * @syscap SystemCapability.Web.Webview.Core
3076   * @atomicservice
3077   * @since 11
3078   */
3079  copyImage(): void;
3080
3081  /**
3082   * Executes the copy operation related to this context menu.
3083   *
3084   * @syscap SystemCapability.Web.Webview.Core
3085   * @since 9
3086   */
3087  /**
3088   * Executes the copy operation related to this context menu.
3089   *
3090   * @syscap SystemCapability.Web.Webview.Core
3091   * @atomicservice
3092   * @since 11
3093   */
3094  copy(): void;
3095
3096  /**
3097   * Executes the paste operation related to this context menu.
3098   *
3099   * @syscap SystemCapability.Web.Webview.Core
3100   * @since 9
3101   */
3102  /**
3103   * Executes the paste operation related to this context menu.
3104   *
3105   * @syscap SystemCapability.Web.Webview.Core
3106   * @atomicservice
3107   * @since 11
3108   */
3109  paste(): void;
3110
3111  /**
3112   * Executes the cut operation related to this context menu.
3113   *
3114   * @syscap SystemCapability.Web.Webview.Core
3115   * @since 9
3116   */
3117  /**
3118   * Executes the cut operation related to this context menu.
3119   *
3120   * @syscap SystemCapability.Web.Webview.Core
3121   * @atomicservice
3122   * @since 11
3123   */
3124  cut(): void;
3125
3126  /**
3127   * Executes the selectAll operation related to this context menu.
3128   *
3129   * @syscap SystemCapability.Web.Webview.Core
3130   * @since 9
3131   */
3132  /**
3133   * Executes the selectAll operation related to this context menu.
3134   *
3135   * @syscap SystemCapability.Web.Webview.Core
3136   * @atomicservice
3137   * @since 11
3138   */
3139  selectAll(): void;
3140}
3141
3142/**
3143 * Encompassed message information as parameters to {@link onConsole} method.
3144 *
3145 * @syscap SystemCapability.Web.Webview.Core
3146 * @since 8
3147 */
3148/**
3149 * Encompassed message information as parameters to {@link onConsole} method.
3150 *
3151 * @syscap SystemCapability.Web.Webview.Core
3152 * @crossplatform
3153 * @atomicservice
3154 * @since 11
3155 */
3156declare class ConsoleMessage {
3157  /**
3158   * Constructor.
3159   *
3160   * @param { string } message - The console message.
3161   * @param { string } sourceId - The Web source file's path and name.
3162   * @param { number } lineNumber - The line number of the console message.
3163   * @param { MessageLevel } messageLevel - The console log level.
3164   * @syscap SystemCapability.Web.Webview.Core
3165   * @since 8
3166   * @deprecated since 9
3167   * @useinstead ohos.web.ConsoleMessage#constructor
3168   */
3169  constructor(message: string, sourceId: string, lineNumber: number, messageLevel: MessageLevel);
3170
3171  /**
3172   * Constructor.
3173   *
3174   * @syscap SystemCapability.Web.Webview.Core
3175   * @since 9
3176   */
3177  /**
3178   * Constructor.
3179   *
3180   * @syscap SystemCapability.Web.Webview.Core
3181   * @crossplatform
3182   * @atomicservice
3183   * @since 11
3184   */
3185  constructor();
3186
3187  /**
3188   * Gets the message of a console message.
3189   *
3190   * @returns { string } Return the message of a console message.
3191   * @syscap SystemCapability.Web.Webview.Core
3192   * @since 8
3193   */
3194  /**
3195   * Gets the message of a console message.
3196   *
3197   * @returns { string } Return the message of a console message.
3198   * @syscap SystemCapability.Web.Webview.Core
3199   * @crossplatform
3200   * @atomicservice
3201   * @since 11
3202   */
3203  getMessage(): string;
3204
3205  /**
3206   * Gets the Web source file's path and name of a console message.
3207   *
3208   * @returns { string } Return the Web source file's path and name of a console message.
3209   * @syscap SystemCapability.Web.Webview.Core
3210   * @since 8
3211   */
3212  /**
3213   * Gets the Web source file's path and name of a console message.
3214   *
3215   * @returns { string } Return the Web source file's path and name of a console message.
3216   * @syscap SystemCapability.Web.Webview.Core
3217   * @atomicservice
3218   * @since 11
3219   */
3220  getSourceId(): string;
3221
3222  /**
3223   * Gets the line number of a console message.
3224   *
3225   * @returns { number } Return the line number of a console message.
3226   * @syscap SystemCapability.Web.Webview.Core
3227   * @since 8
3228   */
3229  /**
3230   * Gets the line number of a console message.
3231   *
3232   * @returns { number } Return the line number of a console message.
3233   * @syscap SystemCapability.Web.Webview.Core
3234   * @atomicservice
3235   * @since 11
3236   */
3237  getLineNumber(): number;
3238
3239  /**
3240   * Gets the message level of a console message.
3241   *
3242   * @returns { MessageLevel } Return the message level of a console message, which can be {@link MessageLevel}.
3243   * @syscap SystemCapability.Web.Webview.Core
3244   * @since 8
3245   */
3246  /**
3247   * Gets the message level of a console message.
3248   *
3249   * @returns { MessageLevel } Return the message level of a console message, which can be {@link MessageLevel}.
3250   * @syscap SystemCapability.Web.Webview.Core
3251   * @crossplatform
3252   * @atomicservice
3253   * @since 11
3254   */
3255  getMessageLevel(): MessageLevel;
3256}
3257
3258/**
3259 * Encompassed message information as parameters to {@link onConsole} method.
3260 *
3261 * @syscap SystemCapability.Web.Webview.Core
3262 * @since 8
3263 */
3264/**
3265 * Defines the Web resource request.
3266 *
3267 * @syscap SystemCapability.Web.Webview.Core
3268 * @since 8
3269 */
3270/**
3271 * Defines the Web resource request.
3272 *
3273 * @syscap SystemCapability.Web.Webview.Core
3274 * @crossplatform
3275 * @since 10
3276 */
3277/**
3278 * Defines the Web resource request.
3279 *
3280 * @syscap SystemCapability.Web.Webview.Core
3281 * @crossplatform
3282 * @atomicservice
3283 * @since 11
3284 */
3285declare class WebResourceRequest {
3286  /**
3287   * Constructor.
3288   *
3289   * @syscap SystemCapability.Web.Webview.Core
3290   * @since 8
3291   */
3292  /**
3293   * Constructor.
3294   *
3295   * @syscap SystemCapability.Web.Webview.Core
3296   * @crossplatform
3297   * @since 10
3298   */
3299  /**
3300   * Constructor.
3301   *
3302   * @syscap SystemCapability.Web.Webview.Core
3303   * @crossplatform
3304   * @atomicservice
3305   * @since 11
3306   */
3307  constructor();
3308
3309  /**
3310   * Gets request headers.
3311   *
3312   * @returns { Array<Header> } Return the request headers
3313   * @syscap SystemCapability.Web.Webview.Core
3314   * @since 8
3315   */
3316  /**
3317   * Gets request headers.
3318   *
3319   * @returns { Array<Header> } Return the request headers
3320   * @syscap SystemCapability.Web.Webview.Core
3321   * @atomicservice
3322   * @since 11
3323   */
3324  getRequestHeader(): Array<Header>;
3325
3326  /**
3327   * Gets the request URL.
3328   *
3329   * @returns { string } Return the request URL.
3330   * @syscap SystemCapability.Web.Webview.Core
3331   * @since 8
3332   */
3333  /**
3334   * Gets the request URL.
3335   *
3336   * @returns { string } Return the request URL.
3337   * @syscap SystemCapability.Web.Webview.Core
3338   * @crossplatform
3339   * @since 10
3340   */
3341  /**
3342   * Gets the request URL.
3343   *
3344   * @returns { string } Return the request URL.
3345   * @syscap SystemCapability.Web.Webview.Core
3346   * @crossplatform
3347   * @atomicservice
3348   * @since 11
3349   */
3350  getRequestUrl(): string;
3351
3352  /**
3353   * Check whether the request is associated with gesture.
3354   *
3355   * @returns { boolean } Return {@code true} if the request is associated with gesture;return {@code false} otherwise.
3356   * @syscap SystemCapability.Web.Webview.Core
3357   * @since 8
3358   */
3359  /**
3360   * Check whether the request is associated with gesture.
3361   *
3362   * @returns { boolean } Return {@code true} if the request is associated with gesture;return {@code false} otherwise.
3363   * @syscap SystemCapability.Web.Webview.Core
3364   * @atomicservice
3365   * @since 11
3366   */
3367  isRequestGesture(): boolean;
3368
3369  /**
3370   * Check whether the request is for getting the main frame.
3371   *
3372   * @returns { boolean } Return {@code true} if the request is associated with gesture for getting the main frame; return {@code false} otherwise.
3373   * @syscap SystemCapability.Web.Webview.Core
3374   * @since 8
3375   */
3376  /**
3377   * Check whether the request is for getting the main frame.
3378   *
3379   * @returns { boolean } Return {@code true} if the request is associated with gesture for getting the main frame; return {@code false} otherwise.
3380   * @syscap SystemCapability.Web.Webview.Core
3381   * @atomicservice
3382   * @since 11
3383   */
3384  isMainFrame(): boolean;
3385
3386  /**
3387   * Check whether the request redirects.
3388   *
3389   * @returns { boolean } Return {@code true} if the request redirects; return {@code false} otherwise.
3390   * @syscap SystemCapability.Web.Webview.Core
3391   * @since 8
3392   */
3393  /**
3394   * Check whether the request redirects.
3395   *
3396   * @returns { boolean } Return {@code true} if the request redirects; return {@code false} otherwise.
3397   * @syscap SystemCapability.Web.Webview.Core
3398   * @atomicservice
3399   * @since 11
3400   */
3401  isRedirect(): boolean;
3402
3403  /**
3404   * Get request method.
3405   *
3406   * @returns { string } Return the request method.
3407   * @syscap SystemCapability.Web.Webview.Core
3408   * @since 9
3409   */
3410  /**
3411   * Get request method.
3412   *
3413   * @returns { string } Return the request method.
3414   * @syscap SystemCapability.Web.Webview.Core
3415   * @atomicservice
3416   * @since 11
3417   */
3418  getRequestMethod(): string;
3419}
3420
3421/**
3422 * Defines the Web resource response.
3423 *
3424 * @syscap SystemCapability.Web.Webview.Core
3425 * @since 8
3426 */
3427/**
3428 * Defines the Web resource response.
3429 *
3430 * @syscap SystemCapability.Web.Webview.Core
3431 * @crossplatform
3432 * @atomicservice
3433 * @since 11
3434 */
3435declare class WebResourceResponse {
3436  /**
3437   * Constructor.
3438   *
3439   * @syscap SystemCapability.Web.Webview.Core
3440   * @since 8
3441   */
3442  /**
3443   * Constructor.
3444   *
3445   * @syscap SystemCapability.Web.Webview.Core
3446   * @crossplatform
3447   * @atomicservice
3448   * @since 11
3449   */
3450  constructor();
3451
3452  /**
3453   * Gets the response data.
3454   *
3455   * @returns { string } Return the response data.
3456   * @syscap SystemCapability.Web.Webview.Core
3457   * @since 8
3458   */
3459  /**
3460   * Gets the response data.
3461   *
3462   * @returns { string } Return the response data.
3463   * @syscap SystemCapability.Web.Webview.Core
3464   * @atomicservice
3465   * @since 11
3466   */
3467  getResponseData(): string;
3468
3469  /**
3470   * Gets the response data.
3471   *
3472   * @returns { string | number | ArrayBuffer | Resource | undefined } Return the response data.
3473   *                                                                   string type indicate string in HTML format.
3474   *                                                                   number type indicate file handle.
3475   *                                                                   Resource type indicate $rawfile resource.
3476   *                                                                   ArrayBuffer type indicate binary data.
3477   * @syscap SystemCapability.Web.Webview.Core
3478   * @since 13
3479   */
3480  getResponseDataEx(): string | number | ArrayBuffer | Resource | undefined;
3481
3482  /**
3483   * Gets the response encoding.
3484   *
3485   * @returns { string } Return the response encoding.
3486   * @syscap SystemCapability.Web.Webview.Core
3487   * @since 8
3488   */
3489  /**
3490   * Gets the response encoding.
3491   *
3492   * @returns { string } Return the response encoding.
3493   * @syscap SystemCapability.Web.Webview.Core
3494   * @crossplatform
3495   * @atomicservice
3496   * @since 11
3497   */
3498  getResponseEncoding(): string;
3499
3500  /**
3501   * Gets the response MIME type.
3502   *
3503   * @returns { string } Return the response MIME type.
3504   * @syscap SystemCapability.Web.Webview.Core
3505   * @since 8
3506   */
3507  /**
3508   * Gets the response MIME type.
3509   *
3510   * @returns { string } Return the response MIME type.
3511   * @syscap SystemCapability.Web.Webview.Core
3512   * @crossplatform
3513   * @atomicservice
3514   * @since 11
3515   */
3516  getResponseMimeType(): string;
3517
3518  /**
3519   * Gets the reason message.
3520   *
3521   * @returns { string } Return the reason message.
3522   * @syscap SystemCapability.Web.Webview.Core
3523   * @since 8
3524   */
3525  /**
3526   * Gets the reason message.
3527   *
3528   * @returns { string } Return the reason message.
3529   * @syscap SystemCapability.Web.Webview.Core
3530   * @atomicservice
3531   * @since 11
3532   */
3533  getReasonMessage(): string;
3534
3535  /**
3536   * Gets the response headers.
3537   *
3538   * @returns { Array<Header> } Return the response headers.
3539   * @syscap SystemCapability.Web.Webview.Core
3540   * @since 8
3541   */
3542  /**
3543   * Gets the response headers.
3544   *
3545   * @returns { Array<Header> } Return the response headers.
3546   * @syscap SystemCapability.Web.Webview.Core
3547   * @atomicservice
3548   * @since 11
3549   */
3550  getResponseHeader(): Array<Header>;
3551
3552  /**
3553   * Gets the response code.
3554   *
3555   * @returns { number } Return the response code.
3556   * @syscap SystemCapability.Web.Webview.Core
3557   * @since 8
3558   */
3559  /**
3560   * Gets the response code.
3561   *
3562   * @returns { number } Return the response code.
3563   * @syscap SystemCapability.Web.Webview.Core
3564   * @crossplatform
3565   * @atomicservice
3566   * @since 11
3567   */
3568  getResponseCode(): number;
3569
3570  /**
3571   * Sets the response data.
3572   *
3573   * @param { string | number | Resource } data - the response data.
3574   * @syscap SystemCapability.Web.Webview.Core
3575   * @since 9
3576   */
3577  /**
3578   * Sets the response data.
3579   *
3580   * @param { string | number | Resource } data - the response data.
3581   *                                              string type indicate strings in HTML format.
3582   *                                              number type indicate file handle.
3583   *                                              Resource type indicate $rawfile resource.
3584   * @syscap SystemCapability.Web.Webview.Core
3585   * @since 10
3586   */
3587  /**
3588   * Sets the response data.
3589   *
3590   * @param { string | number | Resource | ArrayBuffer } data - the response data.
3591   *                                              string type indicate strings in HTML format.
3592   *                                              number type indicate file handle.
3593   *                                              Resource type indicate $rawfile resource.
3594   *                                              ArrayBuffer type indicate binary data.
3595   * @syscap SystemCapability.Web.Webview.Core
3596   * @atomicservice
3597   * @since 11
3598   */
3599  setResponseData(data: string | number | Resource | ArrayBuffer): void;
3600
3601  /**
3602   * Sets the response encoding.
3603   *
3604   * @param { string } encoding the response encoding.
3605   * @syscap SystemCapability.Web.Webview.Core
3606   * @since 9
3607   */
3608  /**
3609   * Sets the response encoding.
3610   *
3611   * @param { string } encoding the response encoding.
3612   * @syscap SystemCapability.Web.Webview.Core
3613   * @atomicservice
3614   * @since 11
3615   */
3616  /**
3617   * Sets the response encoding.
3618   *
3619   * @param { string } encoding the response encoding.
3620   * @syscap SystemCapability.Web.Webview.Core
3621   * @atomicservice
3622   * @since 12
3623   */
3624  setResponseEncoding(encoding: string): void;
3625
3626  /**
3627   * Sets the response MIME type.
3628   *
3629   * @param { string } mimeType the response MIME type.
3630   * @syscap SystemCapability.Web.Webview.Core
3631   * @since 9
3632   */
3633  /**
3634   * Sets the response MIME type.
3635   *
3636   * @param { string } mimeType the response MIME type.
3637   * @syscap SystemCapability.Web.Webview.Core
3638   * @atomicservice
3639   * @since 11
3640   */
3641  /**
3642   * Sets the response MIME type.
3643   *
3644   * @param { string } mimeType the response MIME type.
3645   * @syscap SystemCapability.Web.Webview.Core
3646   * @atomicservice
3647   * @since 12
3648   */
3649  setResponseMimeType(mimeType: string): void;
3650
3651  /**
3652   * Sets the reason message.
3653   *
3654   * @param { string } reason the reason message.
3655   * @syscap SystemCapability.Web.Webview.Core
3656   * @since 9
3657   */
3658  /**
3659   * Sets the reason message.
3660   *
3661   * @param { string } reason the reason message.
3662   * @syscap SystemCapability.Web.Webview.Core
3663   * @atomicservice
3664   * @since 11
3665   */
3666  /**
3667   * Sets the reason message.
3668   *
3669   * @param { string } reason the reason message.
3670   * @syscap SystemCapability.Web.Webview.Core
3671   * @atomicservice
3672   * @since 12
3673   */
3674  setReasonMessage(reason: string): void;
3675
3676  /**
3677   * Sets the response headers.
3678   *
3679   * @param { Array<Header> } header the response headers.
3680   * @syscap SystemCapability.Web.Webview.Core
3681   * @since 9
3682   */
3683  /**
3684   * Sets the response headers.
3685   *
3686   * @param { Array<Header> } header the response headers.
3687   * @syscap SystemCapability.Web.Webview.Core
3688   * @atomicservice
3689   * @since 11
3690   */
3691  /**
3692   * Sets the response headers.
3693   *
3694   * @param { Array<Header> } header the response headers.
3695   * @syscap SystemCapability.Web.Webview.Core
3696   * @atomicservice
3697   * @since 12
3698   */
3699  setResponseHeader(header: Array<Header>): void;
3700
3701  /**
3702   * Sets the response code.
3703   *
3704   * @param { number } code the response code.
3705   * @syscap SystemCapability.Web.Webview.Core
3706   * @since 9
3707   */
3708  /**
3709   * Sets the response code.
3710   *
3711   * @param { number } code the response code.
3712   * @syscap SystemCapability.Web.Webview.Core
3713   * @atomicservice
3714   * @since 11
3715   */
3716  /**
3717   * Sets the response code.
3718   *
3719   * @param { number } code the response code.
3720   * @syscap SystemCapability.Web.Webview.Core
3721   * @atomicservice
3722   * @since 12
3723   */
3724  setResponseCode(code: number): void;
3725
3726  /**
3727   * Sets the response is ready or not.
3728   *
3729   * @param { boolean } IsReady whether the response is ready.
3730   * @syscap SystemCapability.Web.Webview.Core
3731   * @since 9
3732   */
3733  /**
3734   * Sets the response is ready or not.
3735   *
3736   * @param { boolean } IsReady whether the response is ready.
3737   * @syscap SystemCapability.Web.Webview.Core
3738   * @atomicservice
3739   * @since 11
3740   */
3741  /**
3742   * Sets the response is ready or not.
3743   *
3744   * @param { boolean } IsReady whether the response is ready.
3745   * @syscap SystemCapability.Web.Webview.Core
3746   * @atomicservice
3747   * @since 12
3748   */
3749  setResponseIsReady(IsReady: boolean): void;
3750
3751  /**
3752   * Gets whether the response is ready.
3753   *
3754   * @returns { boolean } True indicates the response data is ready and false is not ready.
3755   * @syscap SystemCapability.Web.Webview.Core
3756   * @since 13
3757   */
3758  getResponseIsReady(): boolean;
3759}
3760
3761/**
3762 * Defines the Web's request/response header.
3763 *
3764 * @interface Header
3765 * @syscap SystemCapability.Web.Webview.Core
3766 * @since 8
3767 */
3768/**
3769 * Defines the Web's request/response header.
3770 *
3771 * @interface Header
3772 * @syscap SystemCapability.Web.Webview.Core
3773 * @atomicservice
3774 * @since 11
3775 */
3776/**
3777 * Defines the Web's request/response header.
3778 *
3779 * @typedef Header
3780 * @syscap SystemCapability.Web.Webview.Core
3781 * @atomicservice
3782 * @since 12
3783 */
3784declare interface Header {
3785  /**
3786   * Gets the key of the request/response header.
3787   *
3788   * @type { string }
3789   * @syscap SystemCapability.Web.Webview.Core
3790   * @since 8
3791   */
3792  /**
3793   * Gets the key of the request/response header.
3794   *
3795   * @type { string }
3796   * @syscap SystemCapability.Web.Webview.Core
3797   * @atomicservice
3798   * @since 11
3799   */
3800  headerKey: string;
3801
3802  /**
3803   * Gets the value of the request/response header.
3804   *
3805   * @type { string }
3806   * @syscap SystemCapability.Web.Webview.Core
3807   * @since 8
3808   */
3809  /**
3810   * Gets the value of the request/response header.
3811   *
3812   * @type { string }
3813   * @syscap SystemCapability.Web.Webview.Core
3814   * @atomicservice
3815   * @since 11
3816   */
3817  headerValue: string;
3818}
3819
3820/**
3821 * Defines the Web resource error.
3822 *
3823 * @syscap SystemCapability.Web.Webview.Core
3824 * @since 8
3825 */
3826/**
3827 * Defines the Web resource error.
3828 *
3829 * @syscap SystemCapability.Web.Webview.Core
3830 * @crossplatform
3831 * @since 10
3832 */
3833/**
3834 * Defines the Web resource error.
3835 *
3836 * @syscap SystemCapability.Web.Webview.Core
3837 * @crossplatform
3838 * @atomicservice
3839 * @since 11
3840 */
3841declare class WebResourceError {
3842  /**
3843   * Constructor.
3844   *
3845   * @syscap SystemCapability.Web.Webview.Core
3846   * @since 8
3847   */
3848  /**
3849   * Constructor.
3850   *
3851   * @syscap SystemCapability.Web.Webview.Core
3852   * @crossplatform
3853   * @since 10
3854   */
3855  /**
3856   * Constructor.
3857   *
3858   * @syscap SystemCapability.Web.Webview.Core
3859   * @crossplatform
3860   * @atomicservice
3861   * @since 11
3862   */
3863  constructor();
3864
3865  /**
3866   * Gets the info of the Web resource error.
3867   *
3868   * @returns { string } Return the info of the Web resource error.
3869   * @syscap SystemCapability.Web.Webview.Core
3870   * @since 8
3871   */
3872  /**
3873   * Gets the info of the Web resource error.
3874   *
3875   * @returns { string } Return the info of the Web resource error.
3876   * @syscap SystemCapability.Web.Webview.Core
3877   * @crossplatform
3878   * @since 10
3879   */
3880  /**
3881   * Gets the info of the Web resource error.
3882   *
3883   * @returns { string } Return the info of the Web resource error.
3884   * @syscap SystemCapability.Web.Webview.Core
3885   * @crossplatform
3886   * @atomicservice
3887   * @since 11
3888   */
3889  getErrorInfo(): string;
3890
3891  /**
3892   * Gets the code of the Web resource error.
3893   *
3894   * @returns { number } Return the code of the Web resource error.
3895   * @syscap SystemCapability.Web.Webview.Core
3896   * @since 8
3897   */
3898  /**
3899   * Gets the code of the Web resource error.
3900   *
3901   * @returns { number } Return the code of the Web resource error.
3902   * @syscap SystemCapability.Web.Webview.Core
3903   * @crossplatform
3904   * @since 10
3905   */
3906  /**
3907   * Gets the code of the Web resource error.
3908   *
3909   * @returns { number } Return the code of the Web resource error.
3910   * @syscap SystemCapability.Web.Webview.Core
3911   * @crossplatform
3912   * @atomicservice
3913   * @since 11
3914   */
3915  getErrorCode(): number;
3916}
3917
3918/**
3919 * Defines the js geolocation request.
3920 *
3921 * @syscap SystemCapability.Web.Webview.Core
3922 * @since 8
3923 */
3924/**
3925 * Defines the js geolocation request.
3926 *
3927 * @syscap SystemCapability.Web.Webview.Core
3928 * @crossplatform
3929 * @atomicservice
3930 * @since 11
3931 */
3932declare class JsGeolocation {
3933  /**
3934   * Constructor.
3935   *
3936   * @syscap SystemCapability.Web.Webview.Core
3937   * @since 8
3938   */
3939  /**
3940   * Constructor.
3941   *
3942   * @syscap SystemCapability.Web.Webview.Core
3943   * @crossplatform
3944   * @atomicservice
3945   * @since 11
3946   */
3947  constructor();
3948
3949  /**
3950   * Report the geolocation permission status from users.
3951   *
3952   * @param { string } origin - The origin that ask for the geolocation permission.
3953   * @param { boolean } allow - The geolocation permission status.
3954   * @param { boolean } retain - Whether to allow the geolocation permission status to be saved to the system.
3955   * @syscap SystemCapability.Web.Webview.Core
3956   * @since 8
3957   */
3958  /**
3959   * Report the geolocation permission status from users.
3960   *
3961   * @param { string } origin - The origin that ask for the geolocation permission.
3962   * @param { boolean } allow - The geolocation permission status.
3963   * @param { boolean } retain - Whether to allow the geolocation permission status to be saved to the system.
3964   * @syscap SystemCapability.Web.Webview.Core
3965   * @crossplatform
3966   * @atomicservice
3967   * @since 11
3968   */
3969  invoke(origin: string, allow: boolean, retain: boolean): void;
3970}
3971
3972/**
3973 * Defines the Web cookie.
3974 *
3975 * @syscap SystemCapability.Web.Webview.Core
3976 * @since 8
3977 */
3978/**
3979 * Defines the Web cookie.
3980 *
3981 * @syscap SystemCapability.Web.Webview.Core
3982 * @atomicservice
3983 * @since 11
3984 */
3985declare class WebCookie {
3986  /**
3987   * Constructor.
3988   *
3989   * @syscap SystemCapability.Web.Webview.Core
3990   * @since 8
3991   */
3992  /**
3993   * Constructor.
3994   *
3995   * @syscap SystemCapability.Web.Webview.Core
3996   * @atomicservice
3997   * @since 11
3998   */
3999  constructor();
4000
4001  /**
4002   * Sets the cookie.
4003   *
4004   * @syscap SystemCapability.Web.Webview.Core
4005   * @since 8
4006   * @deprecated since 9
4007   * @useinstead ohos.web.webview.webview.WebCookieManager#setCookie
4008   */
4009  setCookie();
4010
4011  /**
4012   * Saves the cookies.
4013   *
4014   * @syscap SystemCapability.Web.Webview.Core
4015   * @since 8
4016   * @deprecated since 9
4017   * @useinstead ohos.web.webview.webview.WebCookieManager#saveCookieAsync
4018   */
4019  saveCookie();
4020}
4021
4022/**
4023 * Defines the touch event result.
4024 *
4025 * @syscap SystemCapability.Web.Webview.Core
4026 * @atomicservice
4027 * @since 12
4028 */
4029declare class EventResult {
4030  /**
4031   * Constructor.
4032   *
4033   * @syscap SystemCapability.Web.Webview.Core
4034   * @atomicservice
4035   * @since 12
4036   */
4037  constructor();
4038
4039  /**
4040   * Set whether the event is consumed.
4041   *
4042   * @param { boolean } result - True if the event is consumed.
4043   * @syscap SystemCapability.Web.Webview.Core
4044   * @atomicservice
4045   * @since 12
4046   */
4047  setGestureEventResult(result: boolean): void;
4048
4049  /**
4050   * Set whether the event is consumed.
4051   *
4052   * @param { boolean } result - True if the event is consumed.
4053   * @param { boolean } stopPropagation - Stops the propagation of events farther along.Default value is true.
4054   * @syscap SystemCapability.Web.Webview.Core
4055   * @since 14
4056   */
4057  setGestureEventResult(result: boolean, stopPropagation: boolean): void;
4058}
4059
4060/**
4061 * Defines the Web controller.
4062 *
4063 * @syscap SystemCapability.Web.Webview.Core
4064 * @since 8
4065 * @deprecated since 9
4066 * @useinstead ohos.web.webview.webview.WebviewController
4067 */
4068declare class WebController {
4069  /**
4070   * Constructor.
4071   *
4072   * @syscap SystemCapability.Web.Webview.Core
4073   * @since 8
4074   * @deprecated since 9
4075   */
4076  constructor();
4077
4078  /**
4079   * Let the Web inactive.
4080   *
4081   * @syscap SystemCapability.Web.Webview.Core
4082   * @since 8
4083   * @deprecated since 9
4084   * @useinstead ohos.web.webview.webview.WebviewController#onInactive
4085   */
4086  onInactive(): void;
4087
4088  /**
4089   * Let the Web active.
4090   *
4091   * @syscap SystemCapability.Web.Webview.Core
4092   * @since 8
4093   * @deprecated since 9
4094   * @useinstead ohos.web.webview.webview.WebviewController#onActive
4095   */
4096  onActive(): void;
4097
4098  /**
4099   * Let the Web zoom by.
4100   *
4101   * @param { number } factor The zoom factor.
4102   * @syscap SystemCapability.Web.Webview.Core
4103   * @since 8
4104   * @deprecated since 9
4105   * @useinstead ohos.web.webview.webview.WebviewController#zoom
4106   */
4107  zoom(factor: number): void;
4108
4109  /**
4110   * Clears the history in the Web.
4111   *
4112   * @syscap SystemCapability.Web.Webview.Core
4113   * @since 8
4114   * @deprecated since 9
4115   * @useinstead ohos.web.webview.webview.WebviewController#clearHistory
4116   */
4117  clearHistory(): void;
4118
4119  /**
4120   * Loads a piece of code and execute JS code in the context of the currently displayed page.
4121   *
4122   * @param { object } options The options with a piece of code and a callback.
4123   * @syscap SystemCapability.Web.Webview.Core
4124   * @since 8
4125   * @deprecated since 9
4126   * @useinstead ohos.web.webview.webview.WebviewController#runJavaScript
4127   */
4128  runJavaScript(options: { script: string, callback?: (result: string) => void });
4129
4130  /**
4131   * Loads the data or URL.
4132   *
4133   * @param { object } options The options with the data or URL and other information.
4134   * @syscap SystemCapability.Web.Webview.Core
4135   * @since 8
4136   * @deprecated since 9
4137   * @useinstead ohos.web.webview.webview.WebviewController#loadData
4138   */
4139  loadData(options: { data: string, mimeType: string, encoding: string, baseUrl?: string, historyUrl?: string });
4140
4141  /**
4142   * Loads the given URL.
4143   *
4144   * @param { object } options The options with the URL and other information.
4145   * @syscap SystemCapability.Web.Webview.Core
4146   * @since 8
4147   * @deprecated since 9
4148   * @useinstead ohos.web.webview.webview.WebviewController#loadUrl
4149   */
4150  loadUrl(options: { url: string | Resource, headers?: Array<Header> });
4151
4152  /**
4153   * refreshes the current URL.
4154   *
4155   * @syscap SystemCapability.Web.Webview.Core
4156   * @since 8
4157   * @deprecated since 9
4158   * @useinstead ohos.web.webview.webview.WebviewController#refresh
4159   */
4160  refresh();
4161
4162  /**
4163   * Stops the current load.
4164   *
4165   * @syscap SystemCapability.Web.Webview.Core
4166   * @since 8
4167   * @deprecated since 9
4168   * @useinstead ohos.web.webview.webview.WebviewController#stop
4169   */
4170  stop();
4171
4172  /**
4173   * Registers the JavaScript object and method list.
4174   *
4175   * @param { object } options - The option with the JavaScript object and method list.
4176   * @syscap SystemCapability.Web.Webview.Core
4177   * @since 8
4178   * @deprecated since 9
4179   * @useinstead ohos.web.webview.webview.WebviewController#registerJavaScriptProxy
4180   */
4181  registerJavaScriptProxy(options: { object: object, name: string, methodList: Array<string> });
4182
4183  /**
4184   * Deletes a registered JavaScript object with given name.
4185   *
4186   * @param { string } name - The name of a registered JavaScript object to be deleted.
4187   * @syscap SystemCapability.Web.Webview.Core
4188   * @since 8
4189   * @deprecated since 9
4190   * @useinstead ohos.web.webview.webview.WebviewController#deleteJavaScriptRegister
4191   */
4192  deleteJavaScriptRegister(name: string);
4193
4194  /**
4195   * Gets the type of HitTest.
4196   *
4197   * @returns { HitTestType } The type of HitTest.
4198   * @syscap SystemCapability.Web.Webview.Core
4199   * @since 8
4200   * @deprecated since 9
4201   * @useinstead ohos.web.webview.webview.WebviewController#getHitTest
4202   */
4203  getHitTest(): HitTestType;
4204
4205  /**
4206   * Gets the request focus.
4207   *
4208   * @syscap SystemCapability.Web.Webview.Core
4209   * @since 8
4210   * @deprecated since 9
4211   * @useinstead ohos.web.webview.webview.WebviewController#requestFocus
4212   */
4213  requestFocus();
4214
4215  /**
4216   * Checks whether the web page can go back.
4217   *
4218   * @returns { boolean } Whether the web page can go back.
4219   * @syscap SystemCapability.Web.Webview.Core
4220   * @since 8
4221   * @deprecated since 9
4222   * @useinstead ohos.web.webview.webview.WebviewController#accessBackward
4223   */
4224  accessBackward(): boolean;
4225
4226  /**
4227   * Checks whether the web page can go forward.
4228   *
4229   * @returns { boolean }
4230   * @syscap SystemCapability.Web.Webview.Core
4231   * @since 8
4232   * @deprecated since 9
4233   * @useinstead ohos.web.webview.webview.WebviewController#accessForward
4234   */
4235  accessForward(): boolean;
4236
4237  /**
4238   * Checks whether the web page can go back or forward the given number of steps.
4239   *
4240   * @param { number } step The number of steps.
4241   * @returns { boolean }
4242   * @syscap SystemCapability.Web.Webview.Core
4243   * @since 8
4244   * @deprecated since 9
4245   * @useinstead ohos.web.webview.webview.WebviewController#accessStep
4246   */
4247  accessStep(step: number): boolean;
4248
4249  /**
4250   * Goes back in the history of the web page.
4251   *
4252   * @syscap SystemCapability.Web.Webview.Core
4253   * @since 8
4254   * @deprecated since 9
4255   * @useinstead ohos.web.webview.webview.WebviewController#backward
4256   */
4257  backward();
4258
4259  /**
4260   * Goes forward in the history of the web page.
4261   *
4262   * @syscap SystemCapability.Web.Webview.Core
4263   * @since 8
4264   * @deprecated since 9
4265   * @useinstead ohos.web.webview.webview.WebviewController#forward
4266   */
4267  forward();
4268
4269  /**
4270   * Gets network cookie manager
4271   *
4272   * @returns { WebCookie }
4273   * @syscap SystemCapability.Web.Webview.Core
4274   * @since 9
4275   * @deprecated since 9
4276   * @useinstead ohos.web.webview.WebCookieManager
4277   */
4278  getCookieManager(): WebCookie
4279}
4280
4281/**
4282 * Defines the Web options.
4283 *
4284 * @interface WebOptions
4285 * @syscap SystemCapability.Web.Webview.Core
4286 * @since 8
4287 */
4288/**
4289 * Defines the Web options.
4290 *
4291 * @interface WebOptions
4292 * @syscap SystemCapability.Web.Webview.Core
4293 * @crossplatform
4294 * @since 10
4295 */
4296/**
4297 * Defines the Web options.
4298 *
4299 * @interface WebOptions
4300 * @syscap SystemCapability.Web.Webview.Core
4301 * @crossplatform
4302 * @atomicservice
4303 * @since 11
4304 */
4305/**
4306 * Defines the Web options.
4307 *
4308 * @typedef WebOptions
4309 * @syscap SystemCapability.Web.Webview.Core
4310 * @crossplatform
4311 * @atomicservice
4312 * @since 12
4313 */
4314declare interface WebOptions {
4315  /**
4316   * Sets the address of the web page to be displayed.
4317   *
4318   * @type { string | Resource }
4319   * @syscap SystemCapability.Web.Webview.Core
4320   * @since 8
4321   */
4322  /**
4323   * Sets the address of the web page to be displayed.
4324   *
4325   * @type { string | Resource }
4326   * @syscap SystemCapability.Web.Webview.Core
4327   * @crossplatform
4328   * @since 10
4329   */
4330  /**
4331   * Sets the address of the web page to be displayed.
4332   *
4333   * @type { string | Resource }
4334   * @syscap SystemCapability.Web.Webview.Core
4335   * @crossplatform
4336   * @atomicservice
4337   * @since 11
4338   */
4339  src: string | Resource;
4340  /**
4341   * Sets the controller of the Web.
4342   *
4343   * @type { WebController | WebviewController }
4344   * @syscap SystemCapability.Web.Webview.Core
4345   * @since 8
4346   */
4347  /**
4348   * Sets the controller of the Web.
4349   *
4350   * @type { WebController | WebviewController }
4351   * @syscap SystemCapability.Web.Webview.Core
4352   * @since 9
4353  */
4354  /**
4355   * Sets the controller of the Web.
4356   *
4357   * @type { WebController | WebviewController }
4358   * @syscap SystemCapability.Web.Webview.Core
4359   * @crossplatform
4360   * @since 10
4361  */
4362  /**
4363   * Sets the controller of the Web.
4364   *
4365   * @type { WebController | WebviewController }
4366   * @syscap SystemCapability.Web.Webview.Core
4367   * @crossplatform
4368   * @atomicservice
4369   * @since 11
4370  */
4371  controller: WebController | WebviewController;
4372
4373  /**
4374   * Sets the render mode of the web.
4375   *
4376   * @type { ?RenderMode }
4377   * @syscap SystemCapability.Web.Webview.Core
4378   * @atomicservice
4379   * @since 12
4380   */
4381  renderMode? : RenderMode;
4382
4383  /**
4384   * Sets the incognito mode of the Web, the parameter is optional and default value is false.
4385   * When the Web is in incognito mode, cookies, records of websites, geolocation permissions
4386   * will not save in persistent files.
4387   *
4388   * @type { ?boolean }
4389   * @syscap SystemCapability.Web.Webview.Core
4390   * @atomicservice
4391   * @since 11
4392   */
4393  incognitoMode? : boolean;
4394
4395  /**
4396   * Sets the shared render process token of the web.
4397   * When the web is in multiprocess mode, web with the same
4398   * sharedRenderProcessToken will attempt to reuse the same render process.
4399   * The shared render process will remain active until all associated
4400   * web are destroyed.
4401   *
4402   * @type { ?string }
4403   * @syscap SystemCapability.Web.Webview.Core
4404   * @since 12
4405   */
4406  sharedRenderProcessToken? : string;
4407}
4408
4409/**
4410 * Defines the contents of the JavaScript to be injected.
4411 *
4412 * @interface ScriptItem
4413 * @syscap SystemCapability.Web.Webview.Core
4414 * @atomicservice
4415 * @since 11
4416 */
4417/**
4418 * Defines the contents of the JavaScript to be injected.
4419 *
4420 * @typedef ScriptItem
4421 * @syscap SystemCapability.Web.Webview.Core
4422 * @atomicservice
4423 * @since 12
4424 */
4425declare interface ScriptItem {
4426  /**
4427   * Sets the JavaScript to be injected.
4428   *
4429   * @type { string }
4430   * @syscap SystemCapability.Web.Webview.Core
4431   * @atomicservice
4432   * @since 11
4433   */
4434  script: string;
4435  /**
4436   * Sets the rules of the JavaScript.
4437   *
4438   * @type { Array<string> }
4439   * @syscap SystemCapability.Web.Webview.Core
4440   * @atomicservice
4441   * @since 11
4442   */
4443  scriptRules: Array<string>;
4444}
4445
4446/**
4447 * Defines the load committed details.
4448 *
4449 * @interface LoadCommittedDetails
4450 * @syscap SystemCapability.Web.Webview.Core
4451 * @atomicservice
4452 * @since 11
4453 */
4454/**
4455 * Defines the load committed details.
4456 *
4457 * @typedef LoadCommittedDetails
4458 * @syscap SystemCapability.Web.Webview.Core
4459 * @atomicservice
4460 * @since 12
4461 */
4462declare interface LoadCommittedDetails {
4463  /**
4464   * Check whether the request is for getting the main frame.
4465   *
4466   * @type { boolean }
4467   * @syscap SystemCapability.Web.Webview.Core
4468   * @atomicservice
4469   * @since 11
4470   */
4471  isMainFrame: boolean;
4472
4473  /**
4474   * Whether the navigation happened without changing document. Examples of
4475   * same document navigations are:
4476   *   1. reference fragment navigations.
4477   *   2. pushState/replaceState.
4478   *   3. same page history navigation
4479   *
4480   * @type { boolean }
4481   * @syscap SystemCapability.Web.Webview.Core
4482   * @atomicservice
4483   * @since 11
4484   */
4485  isSameDocument: boolean;
4486
4487  /**
4488   * True if the committed entry has replaced the existing one. Note that in
4489   * case of subframes, the NavigationEntry and FrameNavigationEntry objects
4490   * don't actually get replaced - they're reused, but with updated attributes.
4491   *
4492   * @type { boolean }
4493   * @syscap SystemCapability.Web.Webview.Core
4494   * @atomicservice
4495   * @since 11
4496   */
4497  didReplaceEntry: boolean;
4498
4499  /**
4500   * The type of the navigation.
4501   *
4502   * @type { WebNavigationType }
4503   * @syscap SystemCapability.Web.Webview.Core
4504   * @atomicservice
4505   * @since 11
4506   */
4507  navigationType: WebNavigationType;
4508
4509  /**
4510   * The url to navigate.
4511   *
4512   * @type { string }
4513   * @syscap SystemCapability.Web.Webview.Core
4514   * @atomicservice
4515   * @since 11
4516   */
4517  url: string;
4518}
4519
4520/**
4521 * Defines the Intelligent Tracking Prevention details.
4522 *
4523 * @typedef IntelligentTrackingPreventionDetails
4524 * @syscap SystemCapability.Web.Webview.Core
4525 * @atomicservice
4526 * @since 12
4527 */
4528declare interface IntelligentTrackingPreventionDetails {
4529  /**
4530   * The host of website url.
4531   *
4532   * @type { string }
4533   * @syscap SystemCapability.Web.Webview.Core
4534   * @atomicservice
4535   * @since 12
4536   */
4537  host: string;
4538
4539  /**
4540   * The host of tracker url.
4541   *
4542   * @type { string }
4543   * @syscap SystemCapability.Web.Webview.Core
4544   * @atomicservice
4545   * @since 12
4546   */
4547  trackerHost: string;
4548}
4549
4550/**
4551 * Defines the Web interface.
4552 *
4553 * @interface WebInterface
4554 * @syscap SystemCapability.Web.Webview.Core
4555 * @since 8
4556 */
4557/**
4558 * Defines the Web interface.
4559 *
4560 * @interface WebInterface
4561 * @syscap SystemCapability.Web.Webview.Core
4562 * @crossplatform
4563 * @since 10
4564 */
4565/**
4566 * Defines the Web interface.
4567 *
4568 * @interface WebInterface
4569 * @syscap SystemCapability.Web.Webview.Core
4570 * @crossplatform
4571 * @atomicservice
4572 * @since 11
4573 */
4574/**
4575 * Defines the Web interface.
4576 *
4577 * @typedef WebInterface
4578 * @syscap SystemCapability.Web.Webview.Core
4579 * @crossplatform
4580 * @atomicservice
4581 * @since 12
4582 */
4583interface WebInterface {
4584  /**
4585   * Sets Value.
4586   *
4587   * @param { WebOptions } value
4588   * @returns { WebAttribute }
4589   * @syscap SystemCapability.Web.Webview.Core
4590   * @since 8
4591   */
4592  /**
4593   * Sets Value.
4594   *
4595   * @param { WebOptions } value
4596   * @returns { WebAttribute }
4597   * @syscap SystemCapability.Web.Webview.Core
4598   * @crossplatform
4599   * @since 10
4600   */
4601  /**
4602   * Sets Value.
4603   *
4604   * @param { WebOptions } value
4605   * @returns { WebAttribute }
4606   * @syscap SystemCapability.Web.Webview.Core
4607   * @crossplatform
4608   * @atomicservice
4609   * @since 11
4610   */
4611  (value: WebOptions): WebAttribute;
4612}
4613
4614/**
4615 * Defines the embed info.
4616 *
4617 * @interface NativeEmbedInfo
4618 * @syscap SystemCapability.Web.Webview.Core
4619 * @atomicservice
4620 * @since 11
4621 */
4622/**
4623 * Defines the embed info.
4624 *
4625 * @typedef NativeEmbedInfo
4626 * @syscap SystemCapability.Web.Webview.Core
4627 * @atomicservice
4628 * @since 12
4629 */
4630declare interface NativeEmbedInfo {
4631  /**
4632   * The embed id.
4633   *
4634   * @type { ?string }
4635   * @syscap SystemCapability.Web.Webview.Core
4636   * @atomicservice
4637   * @since 11
4638   */
4639  id?: string;
4640  /**
4641   * Only when enableEmbedMode is true and type is marked as native/xxx will be recognized as a same layer component.
4642   *
4643   * @type { ?string }
4644   * @syscap SystemCapability.Web.Webview.Core
4645   * @atomicservice
4646   * @since 11
4647   */
4648  type?: string;
4649  /**
4650   * The embed tag src.
4651   *
4652   * @type { ?string }
4653   * @syscap SystemCapability.Web.Webview.Core
4654   * @atomicservice
4655   * @since 11
4656   */
4657  src?: string;
4658  /**
4659   * The coordinate position of embed element relative to the webComponent.
4660   *
4661   * @type { ?Position }
4662   * @syscap SystemCapability.Web.Webview.Core
4663   * @atomicservice
4664   * @since 12
4665   */
4666  position?: Position;
4667  /**
4668   * The embed tag width.
4669   *
4670   * @type { ?number }
4671   * @syscap SystemCapability.Web.Webview.Core
4672   * @atomicservice
4673   * @since 11
4674   */
4675  width?: number;
4676  /**
4677   * The embed tag height.
4678   *
4679   * @type { ?number }
4680   * @syscap SystemCapability.Web.Webview.Core
4681   * @atomicservice
4682   * @since 11
4683   */
4684  height?: number;
4685  /**
4686   * The embed tag url.
4687   *
4688   * @type { ?string }
4689   * @syscap SystemCapability.Web.Webview.Core
4690   * @atomicservice
4691   * @since 11
4692   */
4693  url?: string;
4694  /**
4695   * The embed tag name.
4696   *
4697   * @type { ?string }
4698   * @syscap SystemCapability.Web.Webview.Core
4699   * @atomicservice
4700   * @since 12
4701   */
4702  tag?: string;
4703  /**
4704   * The embed param list information used by object tag.
4705   *
4706   * @type { ?Map<string, string> }
4707   * @syscap SystemCapability.Web.Webview.Core
4708   * @atomicservice
4709   * @since 12
4710   */
4711  params?: Map<string, string>;
4712}
4713
4714/**
4715 * Defines the Embed Data info.
4716 *
4717 * @interface NativeEmbedDataInfo
4718 * @syscap SystemCapability.Web.Webview.Core
4719 * @atomicservice
4720 * @since 11
4721 */
4722/**
4723 * Defines the Embed Data info.
4724 *
4725 * @typedef NativeEmbedDataInfo
4726 * @syscap SystemCapability.Web.Webview.Core
4727 * @atomicservice
4728 * @since 12
4729 */
4730declare interface NativeEmbedDataInfo {
4731  /**
4732   * The embed status.
4733   *
4734   * @type { ?NativeEmbedStatus }
4735   * @syscap SystemCapability.Web.Webview.Core
4736   * @atomicservice
4737   * @since 11
4738   */
4739  status?: NativeEmbedStatus;
4740  /**
4741   * The surface id.
4742   *
4743   * @type { ?string }
4744   * @syscap SystemCapability.Web.Webview.Core
4745   * @atomicservice
4746   * @since 11
4747   */
4748  surfaceId?: string;
4749  /**
4750   * The embed id.
4751   *
4752   * @type { ?string }
4753   * @syscap SystemCapability.Web.Webview.Core
4754   * @atomicservice
4755   * @since 11
4756   */
4757  embedId?: string;
4758  /**
4759   * The embed info.
4760   *
4761   * @type { ?NativeEmbedInfo }
4762   * @syscap SystemCapability.Web.Webview.Core
4763   * @atomicservice
4764   * @since 11
4765   */
4766  info?: NativeEmbedInfo;
4767}
4768
4769/**
4770 * Defines the Embed Visibility info.
4771 *
4772 * @typedef NativeEmbedVisibilityInfo
4773 * @syscap SystemCapability.Web.Webview.Core
4774 * @since 12
4775 */
4776declare interface NativeEmbedVisibilityInfo {
4777  /**
4778   * The embed visibility.
4779   *
4780   * @type { boolean }
4781   * @syscap SystemCapability.Web.Webview.Core
4782   * @since 12
4783   */
4784  visibility: boolean;
4785  /**
4786   * The embed id.
4787   *
4788   * @type { string }
4789   * @syscap SystemCapability.Web.Webview.Core
4790   * @since 12
4791   */
4792  embedId: string;
4793}
4794
4795/**
4796 * Defines the user touch info.
4797 *
4798 * @interface NativeEmbedTouchInfo
4799 * @syscap SystemCapability.Web.Webview.Core
4800 * @atomicservice
4801 * @since 11
4802 */
4803/**
4804 * Defines the user touch info.
4805 *
4806 * @typedef NativeEmbedTouchInfo
4807 * @syscap SystemCapability.Web.Webview.Core
4808 * @atomicservice
4809 * @since 12
4810 */
4811declare interface NativeEmbedTouchInfo {
4812  /**
4813   * The native embed id.
4814   *
4815   * @type { ?string }
4816   * @syscap SystemCapability.Web.Webview.Core
4817   * @atomicservice
4818   * @since 11
4819   */
4820  embedId?: string;
4821  /**
4822   * An event sent when the state of contacts with a touch-sensitive surface changes.
4823   *
4824   * @type { ?TouchEvent }
4825   * @syscap SystemCapability.Web.Webview.Core
4826   * @atomicservice
4827   * @since 11
4828   */
4829  touchEvent?: TouchEvent;
4830  /**
4831   * Handle the user's touch result.
4832   *
4833   * @type { ?EventResult }
4834   * @syscap SystemCapability.Web.Webview.Core
4835   * @atomicservice
4836   * @since 12
4837   */
4838  result?: EventResult;
4839}
4840
4841  /**
4842   * Defines the first content paint rendering of web page.
4843   *
4844   * @typedef FirstMeaningfulPaint
4845   * @syscap SystemCapability.Web.Webview.Core
4846   * @atomicservice
4847   * @since 12
4848   */
4849declare interface FirstMeaningfulPaint {
4850  /**
4851   * Start time of navigation.
4852   *
4853   * @type { ?number }
4854   * @syscap SystemCapability.Web.Webview.Core
4855   * @atomicservice
4856   * @since 12
4857   */
4858  navigationStartTime?: number;
4859
4860  /**
4861   * Paint time of first meaningful content.
4862   *
4863   * @type { ?number }
4864   * @syscap SystemCapability.Web.Webview.Core
4865   * @atomicservice
4866   * @since 12
4867   */
4868  firstMeaningfulPaintTime?: number;
4869}
4870
4871/**
4872 * Defines the largest content paint rendering of web page.
4873 *
4874 * @typedef LargestContentfulPaint
4875 * @syscap SystemCapability.Web.Webview.Core
4876 * @atomicservice
4877 * @since 12
4878 */
4879declare interface LargestContentfulPaint {
4880  /**
4881   *  Start time of navigation.
4882   *
4883   * @type { ?number }
4884   * @syscap SystemCapability.Web.Webview.Core
4885   * @atomicservice
4886   * @since 12
4887   */
4888 navigationStartTime?: number;
4889
4890  /**
4891   * Paint time of largest image.
4892   *
4893   * @type { ?number }
4894   * @syscap SystemCapability.Web.Webview.Core
4895   * @atomicservice
4896   * @since 12
4897   */
4898  largestImagePaintTime?: number;
4899
4900    /**
4901     * Paint time of largest text.
4902     *
4903     * @type { ?number }
4904     * @syscap SystemCapability.Web.Webview.Core
4905     * @atomicservice
4906     * @since 12
4907     */
4908  largestTextPaintTime?: number;
4909
4910    /**
4911     * Bits per pixel of image.
4912     *
4913     * @type { ?number }
4914     * @syscap SystemCapability.Web.Webview.Core
4915     * @atomicservice
4916     * @since 12
4917     */
4918  imageBPP?: number;
4919
4920    /**
4921     * Load start time of largest image.
4922     *
4923     * @type { ?number }
4924     * @syscap SystemCapability.Web.Webview.Core
4925     * @atomicservice
4926     * @since 12
4927     */
4928  largestImageLoadStartTime?: number;
4929
4930    /**
4931     * Load end time of largest image.
4932     *
4933     * @type { ?number }
4934     * @syscap SystemCapability.Web.Webview.Core
4935     * @atomicservice
4936     * @since 12
4937     */
4938  largestImageLoadEndTime?: number;
4939}
4940
4941/**
4942 * Defines the render process not responding info.
4943 *
4944 * @interface RenderProcessNotRespondingData
4945 * @syscap SystemCapability.Web.Webview.Core
4946 * @since 12
4947 */
4948declare interface RenderProcessNotRespondingData {
4949  /**
4950   * JavaScript stack info of the webpage when render process not responding.
4951   *
4952   * @type { string }
4953   * @syscap SystemCapability.Web.Webview.Core
4954   * @since 12
4955   */
4956  jsStack: string;
4957
4958  /**
4959   * Process id of render process not responding.
4960   *
4961   * @type { number }
4962   * @syscap SystemCapability.Web.Webview.Core
4963   * @since 12
4964   */
4965  pid: number;
4966
4967  /**
4968   * Reason for the render process not responding.
4969   *
4970   * @type { RenderProcessNotRespondingReason }
4971   * @syscap SystemCapability.Web.Webview.Core
4972   * @since 12
4973   */
4974  reason: RenderProcessNotRespondingReason;
4975}
4976
4977/**
4978 * Defines the triggered function at the end of web page loading.
4979 *
4980 * @typedef OnPageEndEvent
4981 * @syscap SystemCapability.Web.Webview.Core
4982 * @crossplatform
4983 * @atomicservice
4984 * @since 12
4985 */
4986declare interface OnPageEndEvent {
4987  /**
4988   * The url of page.
4989   *
4990   * @type { string }
4991   * @syscap SystemCapability.Web.Webview.Core
4992   * @crossplatform
4993   * @atomicservice
4994   * @since 12
4995   */
4996  url: string;
4997}
4998
4999/**
5000 * Defines the triggered function at the begin of web page loading.
5001 *
5002 * @typedef OnPageBeginEvent
5003 * @syscap SystemCapability.Web.Webview.Core
5004 * @crossplatform
5005 * @atomicservice
5006 * @since 12
5007 */
5008declare interface OnPageBeginEvent {
5009  /**
5010   * The url of page.
5011   *
5012   * @type { string }
5013   * @syscap SystemCapability.Web.Webview.Core
5014   * @crossplatform
5015   * @atomicservice
5016   * @since 12
5017   */
5018  url: string;
5019}
5020
5021/**
5022 * Defines the triggered function when the page loading progress changes.
5023 *
5024 * @typedef OnProgressChangeEvent
5025 * @syscap SystemCapability.Web.Webview.Core
5026 * @crossplatform
5027 * @atomicservice
5028 * @since 12
5029 */
5030declare interface OnProgressChangeEvent {
5031  /**
5032   * The new progress of the page.
5033   *
5034   * @type { number }
5035   * @syscap SystemCapability.Web.Webview.Core
5036   * @crossplatform
5037   * @atomicservice
5038   * @since 12
5039   */
5040  newProgress: number;
5041}
5042
5043/**
5044 * Defines the triggered function when the title of the main application document changes.
5045 *
5046 * @typedef OnTitleReceiveEvent
5047 * @syscap SystemCapability.Web.Webview.Core
5048 * @crossplatform
5049 * @atomicservice
5050 * @since 12
5051 */
5052declare interface OnTitleReceiveEvent {
5053  /**
5054   * The title of the page.
5055   *
5056   * @type { string }
5057   * @syscap SystemCapability.Web.Webview.Core
5058   * @crossplatform
5059   * @atomicservice
5060   * @since 12
5061   */
5062  title: string;
5063}
5064
5065/**
5066 * Defines the triggered function when requesting to show the geolocation permission.
5067 *
5068 * @typedef OnGeolocationShowEvent
5069 * @syscap SystemCapability.Web.Webview.Core
5070 * @crossplatform
5071 * @atomicservice
5072 * @since 12
5073 */
5074declare interface OnGeolocationShowEvent {
5075  /**
5076   * Origin of the page.
5077   *
5078   * @type { string }
5079   * @syscap SystemCapability.Web.Webview.Core
5080   * @crossplatform
5081   * @atomicservice
5082   * @since 12
5083   */
5084  origin: string;
5085  /**
5086   * Defines the js geolocation request.
5087   *
5088   * @type { JsGeolocation }
5089   * @syscap SystemCapability.Web.Webview.Core
5090   * @crossplatform
5091   * @atomicservice
5092   * @since 12
5093   */
5094  geolocation: JsGeolocation;
5095}
5096
5097/**
5098 * Defines the triggered function when the web page wants to display a JavaScript alert() dialog.
5099 *
5100 * @typedef OnAlertEvent
5101 * @syscap SystemCapability.Web.Webview.Core
5102 * @crossplatform
5103 * @atomicservice
5104 * @since 12
5105 */
5106declare interface OnAlertEvent {
5107  /**
5108   * The url of the page.
5109   *
5110   * @type { string }
5111   * @syscap SystemCapability.Web.Webview.Core
5112   * @crossplatform
5113   * @atomicservice
5114   * @since 12
5115   */
5116  url: string;
5117  /**
5118   * The message of alert dialog.
5119   *
5120   * @type { string }
5121   * @syscap SystemCapability.Web.Webview.Core
5122   * @crossplatform
5123   * @atomicservice
5124   * @since 12
5125   */
5126  message: string;
5127  /**
5128   *  Handle the user's JavaScript result.
5129   *
5130   * @type { JsResult }
5131   * @syscap SystemCapability.Web.Webview.Core
5132   * @crossplatform
5133   * @atomicservice
5134   * @since 12
5135   */
5136  result: JsResult;
5137}
5138
5139/**
5140 * Defines the triggered function when the web page wants to confirm navigation from JavaScript onbeforeunload.
5141 *
5142 * @typedef OnBeforeUnloadEvent
5143 * @syscap SystemCapability.Web.Webview.Core
5144 * @atomicservice
5145 * @since 12
5146 */
5147declare interface OnBeforeUnloadEvent {
5148  /**
5149   * The url of the page.
5150   *
5151   * @type { string }
5152   * @syscap SystemCapability.Web.Webview.Core
5153   * @atomicservice
5154   * @since 12
5155   */
5156  url: string;
5157  /**
5158   * The message of confirm dialog.
5159   *
5160   * @type { string }
5161   * @syscap SystemCapability.Web.Webview.Core
5162   * @atomicservice
5163   * @since 12
5164   */
5165  message: string;
5166  /**
5167   *  Handle the user's JavaScript result.
5168   *
5169   * @type { JsResult }
5170   * @syscap SystemCapability.Web.Webview.Core
5171   * @atomicservice
5172   * @since 12
5173   */
5174  result: JsResult;
5175}
5176
5177/**
5178 * Defines the triggered function when the web page wants to display a JavaScript confirm() dialog.
5179 *
5180 * @typedef OnConfirmEvent
5181 * @syscap SystemCapability.Web.Webview.Core
5182 * @crossplatform
5183 * @atomicservice
5184 * @since 12
5185 */
5186declare interface OnConfirmEvent {
5187  /**
5188   * The url of the page.
5189   *
5190   * @type { string }
5191   * @syscap SystemCapability.Web.Webview.Core
5192   * @crossplatform
5193   * @atomicservice
5194   * @since 12
5195   */
5196  url: string;
5197  /**
5198   * The message of confirm dialog.
5199   *
5200   * @type { string }
5201   * @syscap SystemCapability.Web.Webview.Core
5202   * @crossplatform
5203   * @atomicservice
5204   * @since 12
5205   */
5206  message: string;
5207  /**
5208   *  Handle the user's JavaScript result.
5209   *
5210   * @type { JsResult }
5211   * @syscap SystemCapability.Web.Webview.Core
5212   * @crossplatform
5213   * @atomicservice
5214   * @since 12
5215   */
5216  result: JsResult;
5217}
5218
5219/**
5220 * Defines the triggered function when the web page wants to display a JavaScript prompt() dialog.
5221 *
5222 * @typedef OnPromptEvent
5223 * @syscap SystemCapability.Web.Webview.Core
5224 * @crossplatform
5225 * @atomicservice
5226 * @since 12
5227 */
5228declare interface OnPromptEvent {
5229  /**
5230   * The url of the page.
5231   *
5232   * @type { string }
5233   * @syscap SystemCapability.Web.Webview.Core
5234   * @crossplatform
5235   * @atomicservice
5236   * @since 12
5237   */
5238  url: string;
5239  /**
5240   * The message of prompt dialog.
5241   *
5242   * @type { string }
5243   * @syscap SystemCapability.Web.Webview.Core
5244   * @crossplatform
5245   * @atomicservice
5246   * @since 12
5247   */
5248  message: string;
5249  /**
5250   * The value of prompt dialog.
5251   *
5252   * @type { string }
5253   * @syscap SystemCapability.Web.Webview.Core
5254   * @crossplatform
5255   * @atomicservice
5256   * @since 12
5257   */
5258  value: string;
5259  /**
5260   *  Handle the user's JavaScript result.
5261   *
5262   * @type { JsResult }
5263   * @syscap SystemCapability.Web.Webview.Core
5264   * @crossplatform
5265   * @atomicservice
5266   * @since 12
5267   */
5268  result: JsResult;
5269}
5270
5271/**
5272 * Defines the triggered function when the web page receives a JavaScript console message.
5273 *
5274 * @typedef OnConsoleEvent
5275 * @syscap SystemCapability.Web.Webview.Core
5276 * @crossplatform
5277 * @atomicservice
5278 * @since 12
5279 */
5280declare interface OnConsoleEvent {
5281  /**
5282   * Console message information of the event.
5283   *
5284   * @type { ConsoleMessage }
5285   * @syscap SystemCapability.Web.Webview.Core
5286   * @crossplatform
5287   * @atomicservice
5288   * @since 12
5289   */
5290  message: ConsoleMessage;
5291}
5292
5293/**
5294 * Defines the triggered function when the web page receives a web resource loading error.
5295 *
5296 * @typedef OnErrorReceiveEvent
5297 * @syscap SystemCapability.Web.Webview.Core
5298 * @crossplatform
5299 * @atomicservice
5300 * @since 12
5301 */
5302declare interface OnErrorReceiveEvent {
5303  /**
5304   * The information of request.
5305   *
5306   * @type { WebResourceRequest }
5307   * @syscap SystemCapability.Web.Webview.Core
5308   * @crossplatform
5309   * @atomicservice
5310   * @since 12
5311   */
5312  request: WebResourceRequest;
5313  /**
5314   * The information of error.
5315   *
5316   * @type { WebResourceError }
5317   * @syscap SystemCapability.Web.Webview.Core
5318   * @crossplatform
5319   * @atomicservice
5320   * @since 12
5321   */
5322  error: WebResourceError;
5323}
5324
5325/**
5326 * Defines the triggered function when the web page receives a web resource loading HTTP error.
5327 *
5328 * @typedef OnHttpErrorReceiveEvent
5329 * @syscap SystemCapability.Web.Webview.Core
5330 * @crossplatform
5331 * @atomicservice
5332 * @since 12
5333 */
5334declare interface OnHttpErrorReceiveEvent {
5335  /**
5336   * The information of request.
5337   *
5338   * @type { WebResourceRequest }
5339   * @syscap SystemCapability.Web.Webview.Core
5340   * @crossplatform
5341   * @atomicservice
5342   * @since 12
5343   */
5344  request: WebResourceRequest;
5345  /**
5346   *  Web resource response of event.
5347   *
5348   * @type { WebResourceResponse }
5349   * @syscap SystemCapability.Web.Webview.Core
5350   * @crossplatform
5351   * @atomicservice
5352   * @since 12
5353   */
5354  response: WebResourceResponse;
5355}
5356
5357/**
5358 * Defines the triggered function when starting to download.
5359 *
5360 * @typedef OnDownloadStartEvent
5361 * @syscap SystemCapability.Web.Webview.Core
5362 * @crossplatform
5363 * @atomicservice
5364 * @since 12
5365 */
5366declare interface OnDownloadStartEvent {
5367  /**
5368   * The URL of page.
5369   *
5370   * @type { string }
5371   * @syscap SystemCapability.Web.Webview.Core
5372   * @crossplatform
5373   * @atomicservice
5374   * @since 12
5375   */
5376  url: string;
5377  /**
5378   * The userAgent of page.
5379   *
5380   * @type { string }
5381   * @syscap SystemCapability.Web.Webview.Core
5382   * @crossplatform
5383   * @atomicservice
5384   * @since 12
5385   */
5386  userAgent: string;
5387  /**
5388   * The contentDisposition of page.
5389   *
5390   * @type { string }
5391   * @syscap SystemCapability.Web.Webview.Core
5392   * @atomicservice
5393   * @since 12
5394   */
5395  contentDisposition: string;
5396  /**
5397   * The mimetype of page.
5398   *
5399   * @type { string }
5400   * @syscap SystemCapability.Web.Webview.Core
5401   * @crossplatform
5402   * @atomicservice
5403   * @since 12
5404   */
5405  mimetype: string;
5406  /**
5407   * The contentLength of page.
5408   *
5409   * @type { number }
5410   * @syscap SystemCapability.Web.Webview.Core
5411   * @crossplatform
5412   * @atomicservice
5413   * @since 12
5414   */
5415  contentLength: number;
5416}
5417
5418/**
5419 * Defines the triggered callback when the Web page refreshes accessed history.
5420 *
5421 * @typedef OnRefreshAccessedHistoryEvent
5422 * @syscap SystemCapability.Web.Webview.Core
5423 * @atomicservice
5424 * @since 12
5425 */
5426declare interface OnRefreshAccessedHistoryEvent {
5427  /**
5428   * URL of the visit.
5429   *
5430   * @type { string }
5431   * @syscap SystemCapability.Web.Webview.Core
5432   * @atomicservice
5433   * @since 12
5434   */
5435  url: string;
5436  /**
5437   * If true, the page is being reloaded, otherwise,  means that the page is newly loaded.
5438   *
5439   * @type { boolean }
5440   * @syscap SystemCapability.Web.Webview.Core
5441   * @atomicservice
5442   * @since 12
5443   */
5444  isRefreshed: boolean;
5445}
5446
5447/**
5448 * Defines the triggered when the render process exits.
5449 *
5450 * @typedef OnRenderExitedEvent
5451 * @syscap SystemCapability.Web.Webview.Core
5452 * @atomicservice
5453 * @since 12
5454 */
5455declare interface OnRenderExitedEvent {
5456  /**
5457   * The specific reason why the rendering process exits abnormally.
5458   *
5459   * @type { RenderExitReason }
5460   * @syscap SystemCapability.Web.Webview.Core
5461   * @atomicservice
5462   * @since 12
5463   */
5464  renderExitReason: RenderExitReason;
5465}
5466
5467/**
5468 * Defines the triggered when the file selector shows.
5469 *
5470 * @typedef OnShowFileSelectorEvent
5471 * @syscap SystemCapability.Web.Webview.Core
5472 * @crossplatform
5473 * @atomicservice
5474 * @since 12
5475 */
5476declare interface OnShowFileSelectorEvent {
5477  /**
5478   * Defines the file selector result.
5479   *
5480   * @type { FileSelectorResult }
5481   * @syscap SystemCapability.Web.Webview.Core
5482   * @crossplatform
5483   * @atomicservice
5484   * @since 11
5485   */
5486  result: FileSelectorResult;
5487  /**
5488   * Encompassed message information as parameters to fileSelector.
5489   *
5490   * @type { FileSelectorParam }
5491   * @syscap SystemCapability.Web.Webview.Core
5492   * @crossplatform
5493   * @atomicservice
5494   * @since 11
5495   */
5496  fileSelector: FileSelectorParam;
5497}
5498
5499/**
5500 * Defines the triggered when the url loading.
5501 *
5502 * @typedef OnResourceLoadEvent
5503 * @syscap SystemCapability.Web.Webview.Core
5504 * @atomicservice
5505 * @since 12
5506 */
5507declare interface OnResourceLoadEvent {
5508  /**
5509   * The URL of the loaded resource file.
5510   *
5511   * @type { string }
5512   * @syscap SystemCapability.Web.Webview.Core
5513   * @atomicservice
5514   * @since 12
5515   */
5516  url: string;
5517}
5518
5519/**
5520 * Defines the triggered when the scale of WebView changed.
5521 *
5522 * @typedef OnScaleChangeEvent
5523 * @syscap SystemCapability.Web.Webview.Core
5524 * @crossplatform
5525 * @atomicservice
5526 * @since 12
5527 */
5528declare interface OnScaleChangeEvent {
5529  /**
5530   * Old scale of the page.
5531   *
5532   * @type { number }
5533   * @syscap SystemCapability.Web.Webview.Core
5534   * @crossplatform
5535   * @atomicservice
5536   * @since 12
5537   */
5538  oldScale: number;
5539  /**
5540   * New scale of the page.
5541   *
5542   * @type { number }
5543   * @syscap SystemCapability.Web.Webview.Core
5544   * @crossplatform
5545   * @atomicservice
5546   * @since 12
5547   */
5548  newScale: number;
5549}
5550
5551/**
5552 * Defines the triggered when the browser needs credentials from the user.
5553 *
5554 * @typedef OnHttpAuthRequestEvent
5555 * @syscap SystemCapability.Web.Webview.Core
5556 * @crossplatform
5557 * @atomicservice
5558 * @since 12
5559 */
5560declare interface OnHttpAuthRequestEvent {
5561  /**
5562   * Defines the http auth request result.
5563   *
5564   * @type { HttpAuthHandler }
5565   * @syscap SystemCapability.Web.Webview.Core
5566   * @crossplatform
5567   * @atomicservice
5568   * @since 12
5569   */
5570  handler: HttpAuthHandler;
5571  /**
5572   * Host of the page.
5573   *
5574   * @type { string }
5575   * @syscap SystemCapability.Web.Webview.Core
5576   * @crossplatform
5577   * @atomicservice
5578   * @since 12
5579   */
5580  host: string;
5581  /**
5582   * realm of the page.
5583   *
5584   * @type { string }
5585   * @syscap SystemCapability.Web.Webview.Core
5586   * @crossplatform
5587   * @atomicservice
5588   * @since 12
5589   */
5590  realm: string;
5591}
5592
5593/**
5594 * Defines the triggered callback when the resources loading is intercepted.
5595 *
5596 * @typedef OnInterceptRequestEvent
5597 * @syscap SystemCapability.Web.Webview.Core
5598 * @atomicservice
5599 * @since 12
5600 */
5601declare interface OnInterceptRequestEvent {
5602  /**
5603   * The information of request.
5604   *
5605   * @type { WebResourceRequest }
5606   * @syscap SystemCapability.Web.Webview.Core
5607   * @atomicservice
5608   * @since 12
5609   */
5610  request: WebResourceRequest;
5611}
5612
5613/**
5614 * Defines the triggered callback when the host application that web content from the specified origin is
5615 *     attempting to access the resources.
5616 *
5617 * @typedef OnPermissionRequestEvent
5618 * @syscap SystemCapability.Web.Webview.Core
5619 * @crossplatform
5620 * @atomicservice
5621 * @since 12
5622 */
5623declare interface OnPermissionRequestEvent {
5624  /**
5625   * Defines the onPermissionRequest callback.
5626   *
5627   * @type { PermissionRequest }
5628   * @syscap SystemCapability.Web.Webview.Core
5629   * @crossplatform
5630   * @atomicservice
5631   * @since 12
5632   */
5633  request: PermissionRequest;
5634}
5635
5636/**
5637 * Defines the triggered callback when the host application that web content from the specified origin is
5638 *     requesting to capture screen.
5639 *
5640 * @typedef OnScreenCaptureRequestEvent
5641 * @syscap SystemCapability.Web.Webview.Core
5642 * @atomicservice
5643 * @since 12
5644 */
5645declare interface OnScreenCaptureRequestEvent {
5646  /**
5647   * Notifies the user of the operation behavior of the web component.
5648   *
5649   * @type { ScreenCaptureHandler }
5650   * @syscap SystemCapability.Web.Webview.Core
5651   * @atomicservice
5652   * @since 12
5653   */
5654  handler: ScreenCaptureHandler;
5655}
5656
5657/**
5658 * Defines the triggered callback when called to allow custom display of the context menu.
5659 *
5660 * @typedef OnContextMenuShowEvent
5661 * @syscap SystemCapability.Web.Webview.Core
5662 * @atomicservice
5663 * @since 12
5664 */
5665declare interface OnContextMenuShowEvent {
5666  /**
5667   * The menu-related parameters.
5668   *
5669   * @type { WebContextMenuParam }
5670   * @syscap SystemCapability.Web.Webview.Core
5671   * @atomicservice
5672   * @since 12
5673   */
5674  param: WebContextMenuParam;
5675  /**
5676   * The menu corresponding event is passed to the kernel.
5677   *
5678   * @type { WebContextMenuResult }
5679   * @syscap SystemCapability.Web.Webview.Core
5680   * @atomicservice
5681   * @since 12
5682   */
5683  result: WebContextMenuResult;
5684}
5685
5686/**
5687 * Defines function Triggered when the host application call searchAllAsync.
5688 *
5689 * @typedef OnSearchResultReceiveEvent
5690 * @syscap SystemCapability.Web.Webview.Core
5691 * @atomicservice
5692 * @since 12
5693 */
5694declare interface OnSearchResultReceiveEvent {
5695  /**
5696   * The ordinal number of the currently matched lookup item (starting from 0).
5697   *
5698   * @type { number }
5699   * @syscap SystemCapability.Web.Webview.Core
5700   * @atomicservice
5701   * @since 12
5702   */
5703  activeMatchOrdinal: number;
5704  /**
5705   * The number of all matched keywords.
5706   *
5707   * @type { number }
5708   * @syscap SystemCapability.Web.Webview.Core
5709   * @atomicservice
5710   * @since 12
5711   */
5712  numberOfMatches: number;
5713  /**
5714   * Indicates whether the current in-page search operation is complete. The method may be called back multiple times until isDoneCounting is true.
5715   *
5716   * @type { boolean }
5717   * @syscap SystemCapability.Web.Webview.Core
5718   * @atomicservice
5719   * @since 12
5720   */
5721  isDoneCounting: boolean;
5722}
5723
5724/**
5725 * Defines function Triggered when the scroll bar slides to the specified position.
5726 *
5727 * @typedef OnScrollEvent
5728 * @syscap SystemCapability.Web.Webview.Core
5729 * @crossplatform
5730 * @atomicservice
5731 * @since 12
5732 */
5733declare interface OnScrollEvent {
5734  /**
5735   * The X offset of the scroll.
5736   *
5737   * @type { number }
5738   * @syscap SystemCapability.Web.Webview.Core
5739   * @crossplatform
5740   * @atomicservice
5741   * @since 12
5742   */
5743  xOffset: number;
5744  /**
5745   * The Y offset of the scroll.
5746   *
5747   * @type { number }
5748   * @syscap SystemCapability.Web.Webview.Core
5749   * @crossplatform
5750   * @atomicservice
5751   * @since 12
5752   */
5753  yOffset: number;
5754}
5755
5756/**
5757 * Defines the triggered callback when the Web page receives an ssl Error.
5758 *
5759 * @typedef OnSslErrorEventReceiveEvent
5760 * @syscap SystemCapability.Web.Webview.Core
5761 * @atomicservice
5762 * @since 12
5763 */
5764declare interface OnSslErrorEventReceiveEvent {
5765  /**
5766   * Notifies the user of the operation behavior of the web component.
5767   *
5768   * @type { SslErrorHandler }
5769   * @syscap SystemCapability.Web.Webview.Core
5770   * @atomicservice
5771   * @since 12
5772   */
5773  handler: SslErrorHandler;
5774  /**
5775   * Error codes.
5776   *
5777   * @type { SslError }
5778   * @syscap SystemCapability.Web.Webview.Core
5779   * @atomicservice
5780   * @since 12
5781   */
5782  error: SslError;
5783}
5784
5785/**
5786 * Defines the triggered callback when needs ssl client certificate from the user.
5787 *
5788 * @typedef OnClientAuthenticationEvent
5789 * @syscap SystemCapability.Web.Webview.Core
5790 * @atomicservice
5791 * @since 12
5792 */
5793declare interface OnClientAuthenticationEvent {
5794  /**
5795   * Notifies the user of the operation behavior of the web component.
5796   *
5797   * @type { ClientAuthenticationHandler }
5798   * @syscap SystemCapability.Web.Webview.Core
5799   * @atomicservice
5800   * @since 12
5801   */
5802  handler : ClientAuthenticationHandler;
5803  /**
5804   * The hostname of the requesting certificate server.
5805   *
5806   * @type { string }
5807   * @syscap SystemCapability.Web.Webview.Core
5808   * @atomicservice
5809   * @since 12
5810   */
5811  host : string;
5812  /**
5813   * The port number of the request certificate server.
5814   *
5815   * @type { number }
5816   * @syscap SystemCapability.Web.Webview.Core
5817   * @atomicservice
5818   * @since 12
5819   */
5820  port : number;
5821  /**
5822   * Acceptable asymmetric key types.
5823   *
5824   * @type { Array<string> }
5825   * @syscap SystemCapability.Web.Webview.Core
5826   * @atomicservice
5827   * @since 12
5828   */
5829  keyTypes : Array<string>;
5830  /**
5831   * Certificates that match the private key are acceptable to the issuer.
5832   *
5833   * @type { Array<string> }
5834   * @syscap SystemCapability.Web.Webview.Core
5835   * @atomicservice
5836   * @since 12
5837   */
5838  issuers : Array<string>;
5839}
5840
5841/**
5842 * Defines the triggered callback when web page requires the user to create a window.
5843 *
5844 * @typedef OnWindowNewEvent
5845 * @syscap SystemCapability.Web.Webview.Core
5846 * @atomicservice
5847 * @since 12
5848 */
5849declare interface OnWindowNewEvent {
5850  /**
5851   * true indicates the request to create a dialog and false indicates a new tab.
5852   *
5853   * @type { boolean }
5854   * @syscap SystemCapability.Web.Webview.Core
5855   * @atomicservice
5856   * @since 12
5857   */
5858  isAlert: boolean;
5859  /**
5860   * true indicates that it is triggered by the user, and false indicates that it is triggered by a non-user.
5861   *
5862   * @type { boolean }
5863   * @syscap SystemCapability.Web.Webview.Core
5864   * @atomicservice
5865   * @since 12
5866   */
5867  isUserTrigger: boolean;
5868  /**
5869   * Destination URL.
5870   *
5871   * @type { string }
5872   * @syscap SystemCapability.Web.Webview.Core
5873   * @atomicservice
5874   * @since 12
5875   */
5876  targetUrl: string;
5877  /**
5878   * Lets you set the WebviewController instance for creating a new window.
5879   *
5880   * @type { ControllerHandler }
5881   * @syscap SystemCapability.Web.Webview.Core
5882   * @atomicservice
5883   * @since 12
5884   */
5885  handler: ControllerHandler;
5886}
5887
5888/**
5889 * Defines the triggered callback when the application receive an new url of an apple-touch-icon.
5890 *
5891 * @typedef OnTouchIconUrlReceivedEvent
5892 * @syscap SystemCapability.Web.Webview.Core
5893 * @atomicservice
5894 * @since 12
5895 */
5896declare interface OnTouchIconUrlReceivedEvent {
5897  /**
5898   * The apple-touch-icon URL address received.
5899   *
5900   * @type { string }
5901   * @syscap SystemCapability.Web.Webview.Core
5902   * @atomicservice
5903   * @since 12
5904   */
5905  url: string;
5906  /**
5907   * Corresponding to whether apple-touch-icon is precomposited.
5908   *
5909   * @type { boolean }
5910   * @syscap SystemCapability.Web.Webview.Core
5911   * @atomicservice
5912   * @since 12
5913   */
5914  precomposed: boolean;
5915}
5916
5917/**
5918 * Defines the triggered callback when the application receive a new favicon for the current web page.
5919 *
5920 * @typedef OnFaviconReceivedEvent
5921 * @syscap SystemCapability.Web.Webview.Core
5922 * @atomicservice
5923 * @since 12
5924 */
5925declare interface OnFaviconReceivedEvent {
5926  /**
5927   * Received the Favicon icon for the PixelMap object.
5928   *
5929   * @type { PixelMap }
5930   * @syscap SystemCapability.Web.Webview.Core
5931   * @atomicservice
5932   * @since 12
5933   */
5934  favicon: PixelMap;
5935}
5936
5937/**
5938 * Defines the triggered callback when previous page will no longer be drawn and next page begin to draw.
5939 *
5940 * @typedef OnPageVisibleEvent
5941 * @syscap SystemCapability.Web.Webview.Core
5942 * @crossplatform
5943 * @atomicservice
5944 * @since 12
5945 */
5946declare interface OnPageVisibleEvent {
5947  /**
5948   * The URL of page.
5949   *
5950   * @type { string }
5951   * @syscap SystemCapability.Web.Webview.Core
5952   * @crossplatform
5953   * @atomicservice
5954   * @since 12
5955   */
5956  url: string;
5957}
5958
5959/**
5960 * Defines the triggered callback to decision whether resend form data or not.
5961 *
5962 * @typedef OnDataResubmittedEvent
5963 * @syscap SystemCapability.Web.Webview.Core
5964 * @atomicservice
5965 * @since 12
5966 */
5967declare interface OnDataResubmittedEvent {
5968  /**
5969   * Form data resubmission handle.
5970   *
5971   * @type { DataResubmissionHandler }
5972   * @syscap SystemCapability.Web.Webview.Core
5973   * @atomicservice
5974   * @since 12
5975   */
5976  handler: DataResubmissionHandler;
5977}
5978
5979/**
5980 * Defines the playing state of audio on web page.
5981 *
5982 * @typedef OnAudioStateChangedEvent
5983 * @syscap SystemCapability.Web.Webview.Core
5984 * @atomicservice
5985 * @since 12
5986 */
5987declare interface OnAudioStateChangedEvent {
5988  /**
5989   * The audio playback status of the current page, true if playing true otherwise false.
5990   *
5991   * @type { boolean }
5992   * @syscap SystemCapability.Web.Webview.Core
5993   * @atomicservice
5994   * @since 12
5995   */
5996  playing: boolean;
5997}
5998
5999/**
6000 * Defines triggered when the first content rendering of web page.
6001 *
6002 * @typedef OnFirstContentfulPaintEvent
6003 * @syscap SystemCapability.Web.Webview.Core
6004 * @atomicservice
6005 * @since 12
6006 */
6007declare interface OnFirstContentfulPaintEvent {
6008  /**
6009   * The time at which navigation begins, expressed in microseconds.
6010   *
6011   * @type { number }
6012   * @syscap SystemCapability.Web.Webview.Core
6013   * @atomicservice
6014   * @since 12
6015   */
6016  navigationStartTick: number;
6017  /**
6018   * The time it takes to draw content for the first time from navigation, expressed in milliseconds.
6019   *
6020   * @type { number }
6021   * @syscap SystemCapability.Web.Webview.Core
6022   * @atomicservice
6023   * @since 12
6024   */
6025  firstContentfulPaintMs: number;
6026}
6027
6028/**
6029 * Defines the triggered callback when the resources loading is intercepted.
6030 *
6031 * @typedef OnLoadInterceptEvent
6032 * @syscap SystemCapability.Web.Webview.Core
6033 * @crossplatform
6034 * @atomicservice
6035 * @since 12
6036 */
6037declare interface OnLoadInterceptEvent {
6038  /**
6039   * The information of request.
6040   *
6041   * @type { WebResourceRequest }
6042   * @syscap SystemCapability.Web.Webview.Core
6043   * @crossplatform
6044   * @atomicservice
6045   * @since 12
6046   */
6047  data: WebResourceRequest;
6048}
6049
6050/**
6051 * Defines the function Triggered when the over scrolling.
6052 *
6053 * @typedef OnOverScrollEvent
6054 * @syscap SystemCapability.Web.Webview.Core
6055 * @atomicservice
6056 * @since 12
6057 */
6058declare interface OnOverScrollEvent {
6059  /**
6060   * Based on the leftmost part of the page, the horizontal scroll offset is over.
6061   *
6062   * @type { number }
6063   * @syscap SystemCapability.Web.Webview.Core
6064   * @atomicservice
6065   * @since 12
6066   */
6067  xOffset: number;
6068  /**
6069   * Based on the top of the page, the vertical scroll offset is over.
6070   *
6071   * @type { number }
6072   * @syscap SystemCapability.Web.Webview.Core
6073   * @atomicservice
6074   * @since 12
6075   */
6076  yOffset: number;
6077}
6078
6079/**
6080 * Defines the JavaScript object to be injected.
6081 *
6082 * @typedef JavaScriptProxy
6083 * @syscap SystemCapability.Web.Webview.Core
6084 * @atomicservice
6085 * @since 12
6086 */
6087declare interface JavaScriptProxy {
6088  /**
6089   * Objects participating in registration.
6090   *
6091   * @type { object }
6092   * @syscap SystemCapability.Web.Webview.Core
6093   * @atomicservice
6094   * @since 12
6095   */
6096  object: object;
6097  /**
6098   * The name of the registered object, which is consistent with the
6099   *                          object name called in the window.
6100   *
6101   * @type { string }
6102   * @syscap SystemCapability.Web.Webview.Core
6103   * @atomicservice
6104   * @since 12
6105   */
6106  name: string;
6107  /**
6108   * The method of the application side JavaScript object participating
6109   *                                       in the registration.
6110   *
6111   * @type { Array<string> }
6112   * @syscap SystemCapability.Web.Webview.Core
6113   * @atomicservice
6114   * @since 12
6115   */
6116  methodList: Array<string>;
6117  /**
6118   * Controller.
6119   *
6120   * @type { WebController | WebviewController }
6121   * @syscap SystemCapability.Web.Webview.Core
6122   * @atomicservice
6123   * @since 12
6124   */
6125  controller: WebController | WebviewController;
6126  /**
6127   * The async method of the application side JavaScript object participating in the registration.
6128   *
6129   * @type { ?Array<string> }
6130   * @syscap SystemCapability.Web.Webview.Core
6131   * @atomicservice
6132   * @since 12
6133   */
6134  asyncMethodList?: Array<string>;
6135  /**
6136   * permission configuration defining web page URLs that can access JavaScriptProxy methods.
6137   * The configuration can be defined at two levels, object level and method level.
6138   *
6139   * @type { ?string }
6140   * @syscap SystemCapability.Web.Webview.Core
6141   * @atomicservice
6142   * @since 12
6143   */
6144  permission?: string;
6145}
6146
6147/**
6148 * Enum type supplied to {@link keyboardAvoidMode} for setting the web keyboard avoid mode.
6149 *
6150 * @enum { number }
6151 * @syscap SystemCapability.Web.Webview.Core
6152 * @atomicservice
6153 * @since 12
6154 */
6155declare enum WebKeyboardAvoidMode {
6156  /**
6157   * Resize the visual viewport when keyboard avoidance occurs.
6158   *
6159   * @syscap SystemCapability.Web.Webview.Core
6160   * @atomicservice
6161   * @since 12
6162   */
6163  RESIZE_VISUAL = 0,
6164
6165  /**
6166   * Resize the visual and layout viewport when keyboard avoidance occurs.
6167   *
6168   * @syscap SystemCapability.Web.Webview.Core
6169   * @atomicservice
6170   * @since 12
6171   */
6172  RESIZE_CONTENT = 1,
6173
6174  /**
6175   * Do not resize any viewport when keyboard avoidance occurs.
6176   *
6177   * @syscap SystemCapability.Web.Webview.Core
6178   * @atomicservice
6179   * @since 12
6180   */
6181  OVERLAYS_CONTENT = 2,
6182}
6183
6184/**
6185 * Defines Web Elements type.
6186 *
6187 * @enum { number }
6188 * @syscap SystemCapability.Web.Webview.Core
6189 * @since 13
6190 */
6191declare enum WebElementType {
6192  /**
6193   * Image,corresponding HTML image type.
6194   *
6195   * @syscap SystemCapability.Web.Webview.Core
6196   * @since 13
6197   */
6198  IMAGE = 1,
6199}
6200
6201/**
6202 * ResponseType for contextMenu
6203 *
6204 * @enum { number }
6205 * @syscap SystemCapability.Web.Webview.Core
6206 * @since 13
6207 */
6208declare enum WebResponseType {
6209  /**
6210   * Long press.
6211   *
6212   * @syscap SystemCapability.Web.Webview.Core
6213   * @since 13
6214   */
6215  LONG_PRESS = 1,
6216}
6217
6218/**
6219 * Defines the selection menu options.
6220 *
6221 * @typedef SelectionMenuOptionsExt
6222 * @syscap SystemCapability.Web.Webview.Core
6223 * @since 13
6224 */
6225declare interface SelectionMenuOptionsExt {
6226  /**
6227   * Callback function when the selection menu appears.
6228   *
6229   * @type { ?Callback<void> }
6230   * @syscap SystemCapability.Web.Webview.Core
6231   * @since 13
6232   */
6233  onAppear?: Callback<void>;
6234
6235  /**
6236   * Callback function when the selection menu disappears.
6237   *
6238   * @type { ?Callback<void> }
6239   * @syscap SystemCapability.Web.Webview.Core
6240   * @since 13
6241   */
6242  onDisappear?: Callback<void>;
6243
6244  /**
6245   * The preview content of selection menu.
6246   *
6247   * @type { ?CustomBuilder }
6248   * @syscap SystemCapability.Web.Webview.Core
6249   * @since 13
6250   */
6251  preview?: CustomBuilder;
6252
6253  /**
6254   * Menu type, default value is MenuType.SELECTION_MENU.
6255   *
6256   * @type { ?MenuType }
6257   * @syscap SystemCapability.Web.Webview.Core
6258   * @since 13
6259   */
6260  menuType?: MenuType;
6261}
6262
6263/**
6264 * Defines the Web attribute functions.
6265 *
6266 * @extends CommonMethod<WebAttribute>
6267 * @syscap SystemCapability.Web.Webview.Core
6268 * @since 8
6269 */
6270/**
6271 * Defines the Web attribute functions.
6272 *
6273 * @extends CommonMethod<WebAttribute>
6274 * @syscap SystemCapability.Web.Webview.Core
6275 * @crossplatform
6276 * @since 10
6277 */
6278/**
6279 * Defines the Web attribute functions.
6280 *
6281 * @extends CommonMethod<WebAttribute>
6282 * @syscap SystemCapability.Web.Webview.Core
6283 * @crossplatform
6284 * @atomicservice
6285 * @since 11
6286 */
6287declare class WebAttribute extends CommonMethod<WebAttribute> {
6288  /**
6289   * Sets whether the Web allows JavaScript scripts to execute.
6290   *
6291   * @param { boolean } javaScriptAccess - {@code true} means the Web can allows JavaScript scripts to execute; {@code false} otherwise.
6292   *    The default value is true.
6293   * @returns { WebAttribute }
6294   * @syscap SystemCapability.Web.Webview.Core
6295   * @since 8
6296   */
6297  /**
6298   * Sets whether the Web allows JavaScript scripts to execute.
6299   *
6300   * @param { boolean } javaScriptAccess - {@code true} means the Web can allows JavaScript scripts to execute; {@code false} otherwise.
6301   *    The default value is true.
6302   * @returns { WebAttribute }
6303   * @syscap SystemCapability.Web.Webview.Core
6304   * @crossplatform
6305   * @since 10
6306   */
6307  /**
6308   * Sets whether the Web allows JavaScript scripts to execute.
6309   *
6310   * @param { boolean } javaScriptAccess - {@code true} means the Web can allows JavaScript scripts to execute; {@code false} otherwise.
6311   *    The default value is true.
6312   * @returns { WebAttribute }
6313   * @syscap SystemCapability.Web.Webview.Core
6314   * @crossplatform
6315   * @atomicservice
6316   * @since 11
6317   */
6318  javaScriptAccess(javaScriptAccess: boolean): WebAttribute;
6319
6320  /**
6321   * Sets whether enable local file system access in Web.
6322   *
6323   * @param { boolean } fileAccess - {@code true} means enable local file system access in Web; {@code false} otherwise.
6324   *    The default value is true.
6325   * @returns { WebAttribute }
6326   * @syscap SystemCapability.Web.Webview.Core
6327   * @since 8
6328   */
6329  /**
6330   * Sets whether enable local file system access in Web.
6331   *
6332   * @param { boolean } fileAccess - {@code true} means enable local file system access in Web; {@code false} otherwise.
6333   *    The default value is true.
6334   * @returns { WebAttribute }
6335   * @syscap SystemCapability.Web.Webview.Core
6336   * @atomicservice
6337   * @since 11
6338   */
6339  /**
6340   * Sets whether enable local file system access in Web.
6341   *
6342   * @param { boolean } fileAccess - {@code true} means enable local file system access in Web; {@code false} otherwise.
6343   *    The default value is false.
6344   * @returns { WebAttribute }
6345   * @syscap SystemCapability.Web.Webview.Core
6346   * @atomicservice
6347   * @since 12
6348   */
6349  fileAccess(fileAccess: boolean): WebAttribute;
6350
6351  /**
6352   * Sets whether to allow image resources to be loaded from the network.
6353   *
6354   * @param { boolean } onlineImageAccess - {@code true} means the Web can allow image resources to be loaded from the network;
6355   *    The default value is true.
6356   * {@code false} otherwise.
6357   * @returns { WebAttribute }
6358   * @syscap SystemCapability.Web.Webview.Core
6359   * @since 8
6360   */
6361  /**
6362   * Sets whether to allow image resources to be loaded from the network.
6363   *
6364   * @param { boolean } onlineImageAccess - {@code true} means the Web can allow image resources to be loaded from the network;
6365   *    The default value is true.
6366   * {@code false} otherwise.
6367   * @returns { WebAttribute }
6368   * @syscap SystemCapability.Web.Webview.Core
6369   * @atomicservice
6370   * @since 11
6371   */
6372  onlineImageAccess(onlineImageAccess: boolean): WebAttribute;
6373
6374  /**
6375   * Sets whether to enable the DOM Storage API permission.
6376   *
6377   * @param { boolean } domStorageAccess - {@code true} means enable the DOM Storage API permission in Web; {@code false} otherwise.
6378   *    The default value is false.
6379   * @returns { WebAttribute }
6380   * @syscap SystemCapability.Web.Webview.Core
6381   * @since 8
6382   */
6383  /**
6384   * Sets whether to enable the DOM Storage API permission.
6385   *
6386   * @param { boolean } domStorageAccess - {@code true} means enable the DOM Storage API permission in Web; {@code false} otherwise.
6387   *    The default value is false.
6388   * @returns { WebAttribute }
6389   * @syscap SystemCapability.Web.Webview.Core
6390   * @atomicservice
6391   * @since 11
6392   */
6393  domStorageAccess(domStorageAccess: boolean): WebAttribute;
6394
6395  /**
6396   * Sets whether the Web can automatically load image resources.
6397   *
6398   * @param { boolean } imageAccess - {@code true} means the Web can automatically load image resources; {@code false} otherwise.
6399   *    The default value is true.
6400   * @returns { WebAttribute }
6401   * @syscap SystemCapability.Web.Webview.Core
6402   * @since 8
6403   */
6404  /**
6405   * Sets whether the Web can automatically load image resources.
6406   *
6407   * @param { boolean } imageAccess - {@code true} means the Web can automatically load image resources; {@code false} otherwise.
6408   *    The default value is true.
6409   * @returns { WebAttribute }
6410   * @syscap SystemCapability.Web.Webview.Core
6411   * @atomicservice
6412   * @since 11
6413   */
6414  imageAccess(imageAccess: boolean): WebAttribute;
6415
6416  /**
6417   * Sets how to load HTTP and HTTPS content.
6418   *
6419   * @param { MixedMode } mixedMode - The mixed mode, which can be {@link MixedMode}.
6420   * @returns { WebAttribute }
6421   * @syscap SystemCapability.Web.Webview.Core
6422   * @since 8
6423   */
6424  /**
6425   * Sets how to load HTTP and HTTPS content.
6426   *
6427   * @param { MixedMode } mixedMode - The mixed mode, which can be {@link MixedMode}.
6428   * @returns { WebAttribute }
6429   * @syscap SystemCapability.Web.Webview.Core
6430   * @atomicservice
6431   * @since 11
6432   */
6433  mixedMode(mixedMode: MixedMode): WebAttribute;
6434
6435  /**
6436   * Sets whether the Web supports zooming using gestures.
6437   *
6438   * @param { boolean } zoomAccess {@code true} means the Web supports zooming using gestures; {@code false} otherwise.
6439   *    The default value is true.
6440   * @returns { WebAttribute }
6441   * @syscap SystemCapability.Web.Webview.Core
6442   * @since 8
6443   */
6444  /**
6445   * Sets whether the Web supports zooming using gestures.
6446   *
6447   * @param { boolean } zoomAccess {@code true} means the Web supports zooming using gestures; {@code false} otherwise.
6448   *    The default value is true.
6449   * @returns { WebAttribute }
6450   * @syscap SystemCapability.Web.Webview.Core
6451   * @crossplatform
6452   * @since 10
6453   */
6454  /**
6455   * Sets whether the Web supports zooming using gestures.
6456   *
6457   * @param { boolean } zoomAccess {@code true} means the Web supports zooming using gestures; {@code false} otherwise.
6458   *    The default value is true.
6459   * @returns { WebAttribute }
6460   * @syscap SystemCapability.Web.Webview.Core
6461   * @crossplatform
6462   * @atomicservice
6463   * @since 11
6464   */
6465  zoomAccess(zoomAccess: boolean): WebAttribute;
6466
6467  /**
6468   * Sets whether to allow access to geographical locations.
6469   *
6470   * @param { boolean } geolocationAccess - {@code true} means the Web allows access to geographical locations; {@code false} otherwise.
6471   *    The default value is true.
6472   * @returns { WebAttribute }
6473   * @syscap SystemCapability.Web.Webview.Core
6474   * @since 8
6475   */
6476  /**
6477   * Sets whether to allow access to geographical locations.
6478   *
6479   * @param { boolean } geolocationAccess - {@code true} means the Web allows access to geographical locations; {@code false} otherwise.
6480   *    The default value is true.
6481   * @returns { WebAttribute }
6482   * @syscap SystemCapability.Web.Webview.Core
6483   * @crossplatform
6484   * @atomicservice
6485   * @since 11
6486   */
6487  geolocationAccess(geolocationAccess: boolean): WebAttribute;
6488
6489  /**
6490   * Injects the JavaScript object into window and invoke the function in window.
6491   *
6492   * @param { object } javaScriptProxy - The JavaScript object to be injected.
6493   * @returns { WebAttribute }
6494   * @syscap SystemCapability.Web.Webview.Core
6495   * @since 8
6496   */
6497  /**
6498   * Injects the JavaScript object into window and invoke the function in window.
6499   *
6500   * @param { object } javaScriptProxy - The JavaScript object to be injected.
6501   * @returns { WebAttribute }
6502   * @syscap SystemCapability.Web.Webview.Core
6503   * @since 9
6504   */
6505  /**
6506   * Injects the JavaScript object into window and invoke the function in window.
6507   *
6508   * @param { object } javaScriptProxy - The JavaScript object to be injected.
6509   * @returns { WebAttribute }
6510   * @syscap SystemCapability.Web.Webview.Core
6511   * @atomicservice
6512   * @since 11
6513   */
6514  /**
6515   * Injects the JavaScript object into window and invoke the function in window.
6516   *
6517   * @param { JavaScriptProxy } javaScriptProxy - The JavaScript object to be injected.
6518   * @returns { WebAttribute }
6519   * @syscap SystemCapability.Web.Webview.Core
6520   * @atomicservice
6521   * @since 12
6522   */
6523  javaScriptProxy(javaScriptProxy: JavaScriptProxy): WebAttribute;
6524
6525  /**
6526   * Sets whether the Web should save the password.
6527   *
6528   * @param { boolean } password - {@code true} means the Web can save the password; {@code false} otherwise.
6529   * @returns { WebAttribute }
6530   * @syscap SystemCapability.Web.Webview.Core
6531   * @since 8
6532   * @deprecated since 10
6533   */
6534  password(password: boolean): WebAttribute;
6535
6536  /**
6537   * Sets the mode of cache in Web.
6538   *
6539   * @param { CacheMode } cacheMode - The cache mode, which can be {@link CacheMode}.
6540   * @returns { WebAttribute }
6541   * @syscap SystemCapability.Web.Webview.Core
6542   * @since 8
6543   */
6544  /**
6545   * Sets the mode of cache in Web.
6546   *
6547   * @param { CacheMode } cacheMode - The cache mode, which can be {@link CacheMode}.
6548   * @returns { WebAttribute }
6549   * @syscap SystemCapability.Web.Webview.Core
6550   * @atomicservice
6551   * @since 11
6552   */
6553  cacheMode(cacheMode: CacheMode): WebAttribute;
6554
6555  /**
6556   * Sets the dark mode of Web.
6557   *
6558   * @param { WebDarkMode } mode - The dark mode, which can be {@link WebDarkMode}.
6559   * @returns { WebAttribute }
6560   * @syscap SystemCapability.Web.Webview.Core
6561   * @since 9
6562   */
6563  /**
6564   * Sets the dark mode of Web.
6565   *
6566   * @param { WebDarkMode } mode - The dark mode, which can be {@link WebDarkMode}.
6567   * @returns { WebAttribute }
6568   * @syscap SystemCapability.Web.Webview.Core
6569   * @atomicservice
6570   * @since 11
6571   */
6572  darkMode(mode: WebDarkMode): WebAttribute;
6573
6574  /**
6575   * Sets whether to enable forced dark algorithm when the web is in dark mode
6576   *
6577   * @param { boolean } access {@code true} means enable the force dark algorithm; {@code false} otherwise.
6578   * @returns { WebAttribute }
6579   * @syscap SystemCapability.Web.Webview.Core
6580   * @since 9
6581   */
6582  /**
6583   * Sets whether to enable forced dark algorithm when the web is in dark mode
6584   *
6585   * @param { boolean } access {@code true} means enable the force dark algorithm; {@code false} otherwise.
6586   * @returns { WebAttribute }
6587   * @syscap SystemCapability.Web.Webview.Core
6588   * @atomicservice
6589   * @since 11
6590   */
6591  forceDarkAccess(access: boolean): WebAttribute;
6592
6593  /**
6594   * Sets the media options.
6595   *
6596   * @param { WebMediaOptions } options The media options, which can be {@link WebMediaOptions}.
6597   * @returns { WebAttribute }
6598   * @syscap SystemCapability.Web.Webview.Core
6599   * @since 10
6600   */
6601  /**
6602   * Sets the media options.
6603   *
6604   * @param { WebMediaOptions } options The media options, which can be {@link WebMediaOptions}.
6605   * @returns { WebAttribute }
6606   * @syscap SystemCapability.Web.Webview.Core
6607   * @atomicservice
6608   * @since 11
6609   */
6610  mediaOptions(options: WebMediaOptions): WebAttribute;
6611
6612  /**
6613   * Sets whether the Web should save the table data.
6614   *
6615   * @param { boolean } tableData {@code true} means the Web can save the table data; {@code false} otherwise.
6616   * @returns { WebAttribute }
6617   * @syscap SystemCapability.Web.Webview.Core
6618   * @since 8
6619   * @deprecated since 10
6620   */
6621  tableData(tableData: boolean): WebAttribute;
6622
6623  /**
6624   * Sets whether the Web access meta 'viewport' in HTML.
6625   *
6626   * @param { boolean } wideViewModeAccess {@code true} means the Web access meta 'viewport' in HTML; {@code false} otherwise.
6627   * @returns { WebAttribute }
6628   * @syscap SystemCapability.Web.Webview.Core
6629   * @since 8
6630   * @deprecated since 10
6631   */
6632  wideViewModeAccess(wideViewModeAccess: boolean): WebAttribute;
6633
6634  /**
6635   * Sets whether the Web access overview mode.
6636   *
6637   * @param { boolean } overviewModeAccess {@code true} means the Web access overview mode; {@code false} otherwise.
6638   *    The default value is true.
6639   * @returns { WebAttribute }
6640   * @syscap SystemCapability.Web.Webview.Core
6641   * @since 8
6642   */
6643  /**
6644   * Sets whether the Web access overview mode.
6645   *
6646   * @param { boolean } overviewModeAccess {@code true} means the Web access overview mode; {@code false} otherwise.
6647   *    The default value is true.
6648   * @returns { WebAttribute }
6649   * @syscap SystemCapability.Web.Webview.Core
6650   * @atomicservice
6651   * @since 11
6652   */
6653  overviewModeAccess(overviewModeAccess: boolean): WebAttribute;
6654  /**
6655    * Sets the over-scroll mode for web
6656    *
6657    * @param { OverScrollMode } mode - The over-scroll mode, which can be {@link OverScrollMode}.
6658    * @returns { WebAttribute }
6659    * @syscap SystemCapability.Web.Webview.Core
6660    * @atomicservice
6661    * @since 11
6662    */
6663  overScrollMode(mode: OverScrollMode): WebAttribute;
6664  /**
6665   * Sets the blur on for elements on webview when soft keyboard is hidden manually.
6666   *
6667   * @param { BlurOnKeyboardHideMode } mode - Default value is SILENT. Set BLUR to enable the blur on keyboard hide mode, which can be {@link BlurOnKeyboardHideMode}.
6668   * @returns { WebAttribute }
6669   * @syscap SystemCapability.Web.Webview.Core
6670   * @atomicservice
6671   * @since 14
6672   */
6673  blurOnKeyboardHideMode(mode: BlurOnKeyboardHideMode): WebAttribute;
6674  /**
6675   * Sets the ratio of the text zoom.
6676   *
6677   * @param { number } textZoomAtio The ratio of the text zoom.  The default value is 100, ranging from 1 to +∞.
6678   * @returns { WebAttribute }
6679   * @syscap SystemCapability.Web.Webview.Core
6680   * @since 8
6681   * @deprecated since 9
6682   * @useinstead ohos.web.WebAttribute#textZoomRatio
6683   */
6684  textZoomAtio(textZoomAtio: number): WebAttribute;
6685
6686  /**
6687   * Sets the ratio of the text zoom.
6688   *
6689   * @param { number } textZoomRatio The ratio of the text zoom.  The default value is 100, ranging from 1 to +∞.
6690   * @returns { WebAttribute }
6691   * @syscap SystemCapability.Web.Webview.Core
6692   * @since 9
6693   */
6694  /**
6695   * Sets the ratio of the text zoom.
6696   *
6697   * @param { number } textZoomRatio The ratio of the text zoom.  The default value is 100, ranging from 1 to +∞.
6698   * @returns { WebAttribute }
6699   * @syscap SystemCapability.Web.Webview.Core
6700   * @atomicservice
6701   * @since 11
6702   */
6703  textZoomRatio(textZoomRatio: number): WebAttribute;
6704
6705  /**
6706   * Sets whether the Web access the database.
6707   *
6708   * @param { boolean } databaseAccess {@code true} means the Web access the database; {@code false} otherwise.
6709   *    The default value is false.
6710   * @returns { WebAttribute }
6711   * @syscap SystemCapability.Web.Webview.Core
6712   * @since 8
6713   */
6714  /**
6715   * Sets whether the Web access the database.
6716   *
6717   * @param { boolean } databaseAccess {@code true} means the Web access the database; {@code false} otherwise.
6718   *    The default value is false.
6719   * @returns { WebAttribute }
6720   * @syscap SystemCapability.Web.Webview.Core
6721   * @atomicservice
6722   * @since 11
6723   */
6724  databaseAccess(databaseAccess: boolean): WebAttribute;
6725
6726  /**
6727   * Sets the initial scale for the Web.
6728   *
6729   * @param { number } percent the initial scale for the Web.
6730   * @returns { WebAttribute }
6731   * @syscap SystemCapability.Web.Webview.Core
6732   * @since 9
6733   */
6734  /**
6735   * Sets the initial scale for the Web.
6736   *
6737   * @param { number } percent the initial scale for the Web.
6738   * @returns { WebAttribute }
6739   * @syscap SystemCapability.Web.Webview.Core
6740   * @atomicservice
6741   * @since 11
6742   */
6743  initialScale(percent: number): WebAttribute;
6744
6745  /**
6746   * Sets the Web's user agent.
6747   *
6748   * @param { string } userAgent The Web's user agent.
6749   * @returns { WebAttribute }
6750   * @syscap SystemCapability.Web.Webview.Core
6751   * @since 8
6752   * @deprecated since 10
6753   * @useinstead ohos.web.webview.webview.WebviewController#setCustomUserAgent
6754   */
6755  userAgent(userAgent: string): WebAttribute;
6756
6757  /**
6758   * Set whether to support the viewport attribute of the meta tag in the frontend page.
6759   *
6760   * @param { boolean } enabled {@code true} means support the viewport attribute of the meta tag; {@code false} otherwise.
6761   * @returns { WebAttribute }
6762   * @syscap SystemCapability.Web.Webview.Core
6763   * @atomicservice
6764   * @since 12
6765   */
6766  metaViewport(enabled: boolean): WebAttribute;
6767
6768  /**
6769   * Triggered at the end of web page loading.
6770   *
6771   * @param { function } callback The triggered function at the end of web page loading.
6772   * @returns { WebAttribute }
6773   * @syscap SystemCapability.Web.Webview.Core
6774   * @since 8
6775   */
6776  /**
6777   * Triggered at the end of web page loading.
6778   *
6779   * @param { function } callback The triggered function at the end of web page loading.
6780   * @returns { WebAttribute }
6781   * @syscap SystemCapability.Web.Webview.Core
6782   * @crossplatform
6783   * @since 10
6784   */
6785  /**
6786   * Triggered at the end of web page loading.
6787   *
6788   * @param { function } callback The triggered function at the end of web page loading.
6789   * @returns { WebAttribute }
6790   * @syscap SystemCapability.Web.Webview.Core
6791   * @crossplatform
6792   * @atomicservice
6793   * @since 11
6794   */
6795  /**
6796   * Triggered at the end of web page loading.
6797   *
6798   * @param { Callback<OnPageEndEvent> } callback The triggered function at the end of web page loading.
6799   * @returns { WebAttribute }
6800   * @syscap SystemCapability.Web.Webview.Core
6801   * @crossplatform
6802   * @atomicservice
6803   * @since 12
6804   */
6805  onPageEnd(callback: Callback<OnPageEndEvent>): WebAttribute;
6806
6807  /**
6808   * Triggered at the begin of web page loading.
6809   *
6810   * @param { function } callback The triggered function at the begin of web page loading.
6811   * @returns { WebAttribute }
6812   * @syscap SystemCapability.Web.Webview.Core
6813   * @since 8
6814   */
6815  /**
6816   * Triggered at the begin of web page loading.
6817   *
6818   * @param { function } callback The triggered function at the begin of web page loading.
6819   * @returns { WebAttribute }
6820   * @syscap SystemCapability.Web.Webview.Core
6821   * @crossplatform
6822   * @since 10
6823   */
6824  /**
6825   * Triggered at the begin of web page loading.
6826   *
6827   * @param { function } callback The triggered function at the begin of web page loading.
6828   * @returns { WebAttribute }
6829   * @syscap SystemCapability.Web.Webview.Core
6830   * @crossplatform
6831   * @atomicservice
6832   * @since 11
6833   */
6834  /**
6835   * Triggered at the begin of web page loading.
6836   *
6837   * @param { Callback<OnPageBeginEvent> } callback The triggered function at the begin of web page loading.
6838   * @returns { WebAttribute }
6839   * @syscap SystemCapability.Web.Webview.Core
6840   * @crossplatform
6841   * @atomicservice
6842   * @since 12
6843   */
6844  onPageBegin(callback: Callback<OnPageBeginEvent>): WebAttribute;
6845
6846  /**
6847   * Triggered when the page loading progress changes.
6848   *
6849   * @param { function } callback The triggered function when the page loading progress changes.
6850   * @returns { WebAttribute }
6851   * @syscap SystemCapability.Web.Webview.Core
6852   * @since 8
6853   */
6854  /**
6855   * Triggered when the page loading progress changes.
6856   *
6857   * @param { function } callback The triggered function when the page loading progress changes.
6858   * @returns { WebAttribute }
6859   * @syscap SystemCapability.Web.Webview.Core
6860   * @crossplatform
6861   * @atomicservice
6862   * @since 11
6863   */
6864  /**
6865   * Triggered when the page loading progress changes.
6866   *
6867   * @param { Callback<OnProgressChangeEvent> } callback The triggered function when the page loading progress changes.
6868   * @returns { WebAttribute }
6869   * @syscap SystemCapability.Web.Webview.Core
6870   * @crossplatform
6871   * @atomicservice
6872   * @since 12
6873   */
6874  onProgressChange(callback: Callback<OnProgressChangeEvent>): WebAttribute;
6875
6876  /**
6877   * Triggered when the title of the main application document changes.
6878   *
6879   * @param { function } callback The triggered function when the title of the main application document changes.
6880   * @returns { WebAttribute }
6881   * @syscap SystemCapability.Web.Webview.Core
6882   * @since 8
6883   */
6884  /**
6885   * Triggered when the title of the main application document changes.
6886   *
6887   * @param { function } callback The triggered function when the title of the main application document changes.
6888   * @returns { WebAttribute }
6889   * @syscap SystemCapability.Web.Webview.Core
6890   * @crossplatform
6891   * @atomicservice
6892   * @since 11
6893   */
6894  /**
6895   * Triggered when the title of the main application document changes.
6896   *
6897   * @param { Callback<OnTitleReceiveEvent> } callback The triggered function when the title of the main application document changes.
6898   * @returns { WebAttribute }
6899   * @syscap SystemCapability.Web.Webview.Core
6900   * @crossplatform
6901   * @atomicservice
6902   * @since 12
6903   */
6904  onTitleReceive(callback: Callback<OnTitleReceiveEvent>): WebAttribute;
6905
6906  /**
6907   * Triggered when requesting to hide the geolocation.
6908   *
6909   * @param { function } callback The triggered function when requesting to hide the geolocation permission.
6910   * @returns { WebAttribute }
6911   * @syscap SystemCapability.Web.Webview.Core
6912   * @since 8
6913   */
6914  /**
6915   * Triggered when requesting to hide the geolocation.
6916   *
6917   * @param { function } callback The triggered function when requesting to hide the geolocation permission.
6918   * @returns { WebAttribute }
6919   * @syscap SystemCapability.Web.Webview.Core
6920   * @crossplatform
6921   * @atomicservice
6922   * @since 11
6923   */
6924  onGeolocationHide(callback: () => void): WebAttribute;
6925
6926  /**
6927   * Triggered when requesting to show the geolocation permission.
6928   *
6929   * @param { function } callback The triggered function when requesting to show the geolocation permission.
6930   * @returns { WebAttribute }
6931   * @syscap SystemCapability.Web.Webview.Core
6932   * @since 8
6933   */
6934  /**
6935   * Triggered when requesting to show the geolocation permission.
6936   *
6937   * @param { function } callback The triggered function when requesting to show the geolocation permission.
6938   * @returns { WebAttribute }
6939   * @syscap SystemCapability.Web.Webview.Core
6940   * @crossplatform
6941   * @atomicservice
6942   * @since 11
6943   */
6944  /**
6945   * Triggered when requesting to show the geolocation permission.
6946   *
6947   * @param { Callback<OnGeolocationShowEvent> } callback The triggered function when requesting to show the geolocation permission.
6948   * @returns { WebAttribute }
6949   * @syscap SystemCapability.Web.Webview.Core
6950   * @crossplatform
6951   * @atomicservice
6952   * @since 12
6953   */
6954  onGeolocationShow(callback: Callback<OnGeolocationShowEvent>): WebAttribute;
6955
6956  /**
6957   * Triggered when the Web gets the focus.
6958   *
6959   * @param { function } callback The triggered function when the Web gets the focus.
6960   * @returns { WebAttribute }
6961   * @syscap SystemCapability.Web.Webview.Core
6962   * @since 8
6963   */
6964  /**
6965   * Triggered when the Web gets the focus.
6966   *
6967   * @param { function } callback The triggered function when the Web gets the focus.
6968   * @returns { WebAttribute }
6969   * @syscap SystemCapability.Web.Webview.Core
6970   * @atomicservice
6971   * @since 11
6972   */
6973  onRequestSelected(callback: () => void): WebAttribute;
6974
6975  /**
6976   * Triggered when the Web wants to display a JavaScript alert() dialog.
6977   *
6978   * @param { function } callback The triggered function when the web page wants to display a JavaScript alert() dialog.
6979   * @returns { WebAttribute }
6980   * @syscap SystemCapability.Web.Webview.Core
6981   * @since 8
6982   */
6983  /**
6984   * Triggered when the Web wants to display a JavaScript alert() dialog.
6985   *
6986   * @param { function } callback The triggered function when the web page wants to display a JavaScript alert() dialog.
6987   * @returns { WebAttribute }
6988   * @syscap SystemCapability.Web.Webview.Core
6989   * @crossplatform
6990   * @atomicservice
6991   * @since 11
6992   */
6993  /**
6994   * Triggered when the Web wants to display a JavaScript alert() dialog.
6995   *
6996   * @param {  Callback<OnAlertEvent, boolean> } callback The triggered function when the web page wants to display a JavaScript alert() dialog.
6997   * @returns { WebAttribute }
6998   * @syscap SystemCapability.Web.Webview.Core
6999   * @crossplatform
7000   * @atomicservice
7001   * @since 12
7002   */
7003  onAlert(callback: Callback<OnAlertEvent, boolean>): WebAttribute;
7004
7005  /**
7006   * Triggered when the Web wants to confirm navigation from JavaScript onbeforeunload.
7007   *
7008   * @param { function } callback The triggered function when the web page wants to confirm navigation from JavaScript onbeforeunload.
7009   * @returns { WebAttribute }
7010   * @syscap SystemCapability.Web.Webview.Core
7011   * @since 8
7012   */
7013  /**
7014   * Triggered when the Web wants to confirm navigation from JavaScript onbeforeunload.
7015   *
7016   * @param { function } callback The triggered function when the web page wants to confirm navigation from JavaScript onbeforeunload.
7017   * @returns { WebAttribute }
7018   * @syscap SystemCapability.Web.Webview.Core
7019   * @atomicservice
7020   * @since 11
7021   */
7022  /**
7023   * Triggered when the Web wants to confirm navigation from JavaScript onbeforeunload.
7024   *
7025   * @param { Callback<OnBeforeUnloadEvent, boolean> } callback The triggered function when the web page wants to confirm navigation from JavaScript onbeforeunload.
7026   * @returns { WebAttribute }
7027   * @syscap SystemCapability.Web.Webview.Core
7028   * @atomicservice
7029   * @since 12
7030   */
7031  onBeforeUnload(callback: Callback<OnBeforeUnloadEvent, boolean>): WebAttribute;
7032
7033  /**
7034   * Triggered when the web page wants to display a JavaScript confirm() dialog.
7035   *
7036   * @param { function } callback The Triggered function when the web page wants to display a JavaScript confirm() dialog.
7037   * @returns { WebAttribute }
7038   * @syscap SystemCapability.Web.Webview.Core
7039   * @since 8
7040   */
7041  /**
7042   * Triggered when the web page wants to display a JavaScript confirm() dialog.
7043   *
7044   * @param { function } callback The Triggered function when the web page wants to display a JavaScript confirm() dialog.
7045   * @returns { WebAttribute }
7046   * @syscap SystemCapability.Web.Webview.Core
7047   * @crossplatform
7048   * @atomicservice
7049   * @since 11
7050   */
7051  /**
7052   * Triggered when the web page wants to display a JavaScript confirm() dialog.
7053   *
7054   * @param { Callback<OnConfirmEvent, boolean> } callback The triggered function when the web page wants to display a JavaScript confirm() dialog.
7055   * @returns { WebAttribute }
7056   * @syscap SystemCapability.Web.Webview.Core
7057   * @crossplatform
7058   * @atomicservice
7059   * @since 12
7060   */
7061  onConfirm(callback: Callback<OnConfirmEvent, boolean>): WebAttribute;
7062
7063  /**
7064   * Triggered when the web page wants to display a JavaScript prompt() dialog.
7065   *
7066   * @param { function } callback The Triggered function when the web page wants to display a JavaScript prompt() dialog.
7067   * @returns { WebAttribute }
7068   * @syscap SystemCapability.Web.Webview.Core
7069   * @since 9
7070   */
7071  /**
7072   * Triggered when the web page wants to display a JavaScript prompt() dialog.
7073   *
7074   * @param { function } callback The Triggered function when the web page wants to display a JavaScript prompt() dialog.
7075   * @returns { WebAttribute }
7076   * @syscap SystemCapability.Web.Webview.Core
7077   * @crossplatform
7078   * @atomicservice
7079   * @since 11
7080   */
7081  /**
7082   * Triggered when the web page wants to display a JavaScript prompt() dialog.
7083   *
7084   * @param { Callback<OnPromptEvent, boolean> } callback The triggered function when the web page wants to display a JavaScript prompt() dialog.
7085   * @returns { WebAttribute }
7086   * @syscap SystemCapability.Web.Webview.Core
7087   * @crossplatform
7088   * @atomicservice
7089   * @since 12
7090   */
7091  onPrompt(callback: Callback<OnPromptEvent, boolean>): WebAttribute;
7092
7093  /**
7094   * Triggered when the web page receives a JavaScript console message.
7095   *
7096   * @param { function } callback The triggered function when the web page receives a JavaScript console message.
7097   * @returns { WebAttribute }
7098   * @syscap SystemCapability.Web.Webview.Core
7099   * @since 8
7100   */
7101  /**
7102   * Triggered when the web page receives a JavaScript console message.
7103   *
7104   * @param { function } callback The triggered function when the web page receives a JavaScript console message.
7105   * @returns { WebAttribute }
7106   * @syscap SystemCapability.Web.Webview.Core
7107   * @crossplatform
7108   * @atomicservice
7109   * @since 11
7110   */
7111  /**
7112   * Triggered when the web page receives a JavaScript console message.
7113   *
7114   * @param {  Callback<OnConsoleEvent, boolean> } callback The triggered function when the web page receives a JavaScript console message.
7115   * @returns { WebAttribute }
7116   * @syscap SystemCapability.Web.Webview.Core
7117   * @crossplatform
7118   * @atomicservice
7119   * @since 12
7120   */
7121  onConsole(callback: Callback<OnConsoleEvent, boolean>): WebAttribute;
7122
7123  /**
7124   * Triggered when the web page receives a web resource loading error.
7125   *
7126   * @param { function } callback The triggered function when the web page receives a web resource loading error.
7127   * @returns { WebAttribute }
7128   * @syscap SystemCapability.Web.Webview.Core
7129   * @since 8
7130   */
7131  /**
7132   * Triggered when the web page receives a web resource loading error.
7133   *
7134   * @param { function } callback The triggered function when the web page receives a web resource loading error.
7135   * @returns { WebAttribute }
7136   * @syscap SystemCapability.Web.Webview.Core
7137   * @crossplatform
7138   * @since 10
7139   */
7140  /**
7141   * Triggered when the web page receives a web resource loading error.
7142   *
7143   * @param { function } callback The triggered function when the web page receives a web resource loading error.
7144   * @returns { WebAttribute }
7145   * @syscap SystemCapability.Web.Webview.Core
7146   * @crossplatform
7147   * @atomicservice
7148   * @since 11
7149   */
7150  /**
7151   * Triggered when the web page receives a web resource loading error.
7152   *
7153   * @param { Callback<OnErrorReceiveEvent> } callback The triggered function when the web page receives a web resource loading error.
7154   * @returns { WebAttribute }
7155   * @syscap SystemCapability.Web.Webview.Core
7156   * @crossplatform
7157   * @atomicservice
7158   * @since 12
7159   */
7160  onErrorReceive(callback: Callback<OnErrorReceiveEvent>): WebAttribute;
7161
7162  /**
7163   * Triggered when the web page receives a web resource loading HTTP error.
7164   *
7165   * @param { function } callback The triggered function when the web page receives a web resource loading HTTP error.
7166   * @returns { WebAttribute }
7167   * @syscap SystemCapability.Web.Webview.Core
7168   * @since 8
7169   */
7170  /**
7171   * Triggered when the web page receives a web resource loading HTTP error.
7172   *
7173   * @param { function } callback The triggered function when the web page receives a web resource loading HTTP error.
7174   * @returns { WebAttribute }
7175   * @syscap SystemCapability.Web.Webview.Core
7176   * @crossplatform
7177   * @atomicservice
7178   * @since 11
7179   */
7180  /**
7181   * Triggered when the web page receives a web resource loading HTTP error.
7182   *
7183   * @param { Callback<OnHttpErrorReceiveEvent> } callback The triggered function when the web page receives a web resource loading HTTP error.
7184   * @returns { WebAttribute }
7185   * @syscap SystemCapability.Web.Webview.Core
7186   * @crossplatform
7187   * @atomicservice
7188   * @since 12
7189   */
7190  onHttpErrorReceive(callback: Callback<OnHttpErrorReceiveEvent>): WebAttribute;
7191
7192  /**
7193   * Triggered when starting to download.
7194   *
7195   * @param { function } callback The triggered function when starting to download.
7196   * @returns { WebAttribute }
7197   * @syscap SystemCapability.Web.Webview.Core
7198   * @since 8
7199   */
7200  /**
7201   * Triggered when starting to download.
7202   *
7203   * @param { function } callback The triggered function when starting to download.
7204   * @returns { WebAttribute }
7205   * @syscap SystemCapability.Web.Webview.Core
7206   * @crossplatform
7207   * @atomicservice
7208   * @since 11
7209   */
7210  /**
7211   * Triggered when starting to download.
7212   *
7213   * @param { Callback<OnDownloadStartEvent> } callback The triggered function when starting to download.
7214   * @returns { WebAttribute }
7215   * @syscap SystemCapability.Web.Webview.Core
7216   * @crossplatform
7217   * @atomicservice
7218   * @since 12
7219   */
7220  onDownloadStart(callback: Callback<OnDownloadStartEvent>): WebAttribute;
7221
7222  /**
7223   * Triggered when the Web page refreshes accessed history.
7224   *
7225   * @param { function } callback The triggered callback when the Web page refreshes accessed history.
7226   * @returns { WebAttribute }
7227   * @syscap SystemCapability.Web.Webview.Core
7228   * @since 8
7229   */
7230  /**
7231   * Triggered when the Web page refreshes accessed history.
7232   *
7233   * @param { function } callback The triggered callback when the Web page refreshes accessed history.
7234   * @returns { WebAttribute }
7235   * @syscap SystemCapability.Web.Webview.Core
7236   * @atomicservice
7237   * @since 11
7238   */
7239  /**
7240   * Triggered when the Web page refreshes accessed history.
7241   *
7242   * @param { Callback<OnRefreshAccessedHistoryEvent> } callback The triggered callback when the Web page refreshes accessed history.
7243   * @returns { WebAttribute }
7244   * @syscap SystemCapability.Web.Webview.Core
7245   * @atomicservice
7246   * @since 12
7247   */
7248  onRefreshAccessedHistory(callback: Callback<OnRefreshAccessedHistoryEvent>): WebAttribute;
7249
7250  /**
7251   * Triggered when the URL loading is intercepted.
7252   *
7253   * @param { function } callback The triggered callback when the URL loading is intercepted.
7254   * @returns { WebAttribute }
7255   * @syscap SystemCapability.Web.Webview.Core
7256   * @since 8
7257   * @deprecated since 10
7258   * @useinstead ohos.web.WebAttribute#onLoadIntercept
7259   */
7260  onUrlLoadIntercept(callback: (event?: { data: string | WebResourceRequest }) => boolean): WebAttribute;
7261
7262  /**
7263   * Triggered when the Web page receives an ssl Error.
7264   *
7265   * @param { function } callback The triggered callback when the Web page receives an ssl Error.
7266   * @returns { WebAttribute }
7267   * @syscap SystemCapability.Web.Webview.Core
7268   * @since 8
7269   * @deprecated since 9
7270   * @useinstead ohos.web.WebAttribute#onSslErrorEventReceive
7271   */
7272  onSslErrorReceive(callback: (event?: { handler: Function, error: object }) => void): WebAttribute;
7273
7274  /**
7275   * Triggered when the render process exits.
7276   *
7277   * @param { function } callback The triggered when the render process exits.
7278   * @returns { WebAttribute }
7279   * @syscap SystemCapability.Web.Webview.Core
7280   * @since 9
7281   */
7282  /**
7283   * Triggered when the render process exits.
7284   *
7285   * @param { function } callback The triggered when the render process exits.
7286   * @returns { WebAttribute }
7287   * @syscap SystemCapability.Web.Webview.Core
7288   * @atomicservice
7289   * @since 11
7290   */
7291  /**
7292   * Triggered when the render process exits.
7293   *
7294   * @param { Callback<OnRenderExitedEvent> } callback The triggered when the render process exits.
7295   * @returns { WebAttribute }
7296   * @syscap SystemCapability.Web.Webview.Core
7297   * @atomicservice
7298   * @since 12
7299   */
7300  onRenderExited(callback: Callback<OnRenderExitedEvent>): WebAttribute;
7301
7302  /**
7303   * Triggered when the file selector shows.
7304   *
7305   * @param { function } callback The triggered when the file selector shows.
7306   * @returns { WebAttribute }
7307   * @syscap SystemCapability.Web.Webview.Core
7308   * @since 9
7309   */
7310  /**
7311   * Triggered when the file selector shows.
7312   *
7313   * @param { function } callback The triggered when the file selector shows.
7314   * @returns { WebAttribute }
7315   * @syscap SystemCapability.Web.Webview.Core
7316   * @crossplatform
7317   * @atomicservice
7318   * @since 11
7319   */
7320  /**
7321   * Triggered when the file selector shows.
7322   *
7323   * @param { Callback<OnShowFileSelectorEvent, boolean> } callback The triggered when the file selector shows.
7324   * @returns { WebAttribute }
7325   * @syscap SystemCapability.Web.Webview.Core
7326   * @crossplatform
7327   * @atomicservice
7328   * @since 12
7329   */
7330  onShowFileSelector(callback: Callback<OnShowFileSelectorEvent, boolean>): WebAttribute;
7331
7332  /**
7333   * Triggered when the render process exits.
7334   *
7335   * @param { function } callback The triggered when the render process exits.
7336   * @returns { WebAttribute }
7337   * @syscap SystemCapability.Web.Webview.Core
7338   * @since 8
7339   * @deprecated since 9
7340   * @useinstead ohos.web.WebAttribute#onRenderExited
7341   */
7342  onRenderExited(callback: (event?: { detail: object }) => boolean): WebAttribute;
7343
7344  /**
7345   * Triggered when the file selector shows.
7346   *
7347   * @param { function } callback The triggered when the file selector shows.
7348   * @returns { WebAttribute }
7349   * @syscap SystemCapability.Web.Webview.Core
7350   * @since 8
7351   * @deprecated since 9
7352   * @useinstead ohos.web.WebAttribute#onShowFileSelector
7353   */
7354  onFileSelectorShow(callback: (event?: { callback: Function, fileSelector: object }) => void): WebAttribute;
7355
7356  /**
7357   * Triggered when the url loading.
7358   *
7359   * @param { function } callback The triggered when the url loading.
7360   * @returns { WebAttribute }
7361   * @syscap SystemCapability.Web.Webview.Core
7362   * @since 9
7363   */
7364  /**
7365   * Triggered when the url loading.
7366   *
7367   * @param { function } callback The triggered when the url loading.
7368   * @returns { WebAttribute }
7369   * @syscap SystemCapability.Web.Webview.Core
7370   * @atomicservice
7371   * @since 11
7372   */
7373  /**
7374   * Triggered when the url loading.
7375   *
7376   * @param { Callback<OnResourceLoadEvent> } callback The triggered when the url loading.
7377   * @returns { WebAttribute }
7378   * @syscap SystemCapability.Web.Webview.Core
7379   * @atomicservice
7380   * @since 12
7381   */
7382  onResourceLoad(callback: Callback<OnResourceLoadEvent>): WebAttribute;
7383
7384  /**
7385   * Triggered when the web component exit the full screen mode.
7386   *
7387   * @param { function } callback The triggered function when the web component exit the full screen mode.
7388   * @returns { WebAttribute }
7389   * @syscap SystemCapability.Web.Webview.Core
7390   * @since 9
7391   */
7392  /**
7393   * Triggered when the web component exit the full screen mode.
7394   *
7395   * @param { function } callback The triggered function when the web component exit the full screen mode.
7396   * @returns { WebAttribute }
7397   * @syscap SystemCapability.Web.Webview.Core
7398   * @atomicservice
7399   * @since 11
7400   */
7401  onFullScreenExit(callback: () => void): WebAttribute;
7402
7403  /**
7404   * Triggered when the web component enter the full screen mode.
7405   *
7406   * @param { function } callback The triggered function when the web component enter the full screen mode.
7407   * @returns { WebAttribute }
7408   * @syscap SystemCapability.Web.Webview.Core
7409   * @since 9
7410   */
7411  /**
7412   * Triggered when the web component enter the full screen mode.
7413   *
7414   * @param { function } callback The triggered function when the web component enter the full screen mode.
7415   * @returns { WebAttribute }
7416   * @syscap SystemCapability.Web.Webview.Core
7417   * @atomicservice
7418   * @since 11
7419   */
7420  /**
7421   * Triggered when the web component enter the full screen mode.
7422   *
7423   * @param { OnFullScreenEnterCallback } callback - The triggered function when the web component enter the full screen mode.
7424   * @returns { WebAttribute }
7425   * @syscap SystemCapability.Web.Webview.Core
7426   * @atomicservice
7427   * @since 12
7428   */
7429  onFullScreenEnter(callback: OnFullScreenEnterCallback): WebAttribute;
7430
7431  /**
7432   * Triggered when the scale of WebView changed.
7433   *
7434   * @param { function } callback The triggered when the scale of WebView changed.
7435   * @returns { WebAttribute }
7436   * @syscap SystemCapability.Web.Webview.Core
7437   * @since 9
7438   */
7439  /**
7440   * Triggered when the scale of WebView changed.
7441   *
7442   * @param { function } callback The triggered when the scale of WebView changed.
7443   * @returns { WebAttribute }
7444   * @syscap SystemCapability.Web.Webview.Core
7445   * @crossplatform
7446   * @atomicservice
7447   * @since 11
7448   */
7449  /**
7450   * Triggered when the scale of WebView changed.
7451   *
7452   * @param { Callback<OnScaleChangeEvent> } callback The triggered when the scale of WebView changed.
7453   * @returns { WebAttribute }
7454   * @syscap SystemCapability.Web.Webview.Core
7455   * @crossplatform
7456   * @atomicservice
7457   * @since 12
7458   */
7459  onScaleChange(callback: Callback<OnScaleChangeEvent>): WebAttribute;
7460
7461  /**
7462   * Triggered when the browser needs credentials from the user.
7463   *
7464   * @param { function } callback The triggered when the browser needs credentials from the user.
7465   * @returns { WebAttribute }
7466   * @syscap SystemCapability.Web.Webview.Core
7467   * @since 9
7468   */
7469  /**
7470   * Triggered when the browser needs credentials from the user.
7471   *
7472   * @param { function } callback The triggered when the browser needs credentials from the user.
7473   * @returns { WebAttribute }
7474   * @syscap SystemCapability.Web.Webview.Core
7475   * @crossplatform
7476   * @atomicservice
7477   * @since 11
7478   */
7479  /**
7480   * Triggered when the browser needs credentials from the user.
7481   *
7482   * @param { Callback<OnHttpAuthRequestEvent, boolean> } callback The triggered when the browser needs credentials from the user.
7483   * @returns { WebAttribute }
7484   * @syscap SystemCapability.Web.Webview.Core
7485   * @crossplatform
7486   * @atomicservice
7487   * @since 12
7488   */
7489  onHttpAuthRequest(callback: Callback<OnHttpAuthRequestEvent, boolean>): WebAttribute;
7490
7491  /**
7492   * Triggered when the resources loading is intercepted.
7493   *
7494   * @param { function } callback The triggered callback when the resources loading is intercepted.
7495   * @returns { WebAttribute } If the response value is null, the Web will continue to load the resources. Otherwise, the response value will be used
7496   * @syscap SystemCapability.Web.Webview.Core
7497   * @since 9
7498   */
7499  /**
7500   * Triggered when the resources loading is intercepted.
7501   *
7502   * @param { function } callback The triggered callback when the resources loading is intercepted.
7503   * @returns { WebAttribute } If the response value is null, the Web will continue to load the resources. Otherwise, the response value will be used
7504   * @syscap SystemCapability.Web.Webview.Core
7505   * @atomicservice
7506   * @since 11
7507   */
7508  /**
7509   * Triggered when the resources loading is intercepted.
7510   *
7511   * @param { Callback<OnInterceptRequestEvent, WebResourceResponse> } callback The triggered callback when the resources loading is intercepted.
7512   * @returns { WebAttribute } If the response value is null, the Web will continue to load the resources. Otherwise, the response value will be used
7513   * @syscap SystemCapability.Web.Webview.Core
7514   * @atomicservice
7515   * @since 12
7516   */
7517  onInterceptRequest(callback: Callback<OnInterceptRequestEvent, WebResourceResponse>): WebAttribute;
7518
7519  /**
7520   * Triggered when the host application that web content from the specified origin is attempting to access the resources.
7521   *
7522   * @param { function } callback The triggered callback when the host application that web content from the specified origin is
7523   *     attempting to access the resources.
7524   * @returns { WebAttribute }
7525   * @syscap SystemCapability.Web.Webview.Core
7526   * @since 9
7527   */
7528  /**
7529   * Triggered when the host application that web content from the specified origin is attempting to access the resources.
7530   *
7531   * @param { function } callback The triggered callback when the host application that web content from the specified origin is
7532   *     attempting to access the resources.
7533   * @returns { WebAttribute }
7534   * @syscap SystemCapability.Web.Webview.Core
7535   * @crossplatform
7536   * @atomicservice
7537   * @since 11
7538   */
7539  /**
7540   * Triggered when the host application that web content from the specified origin is attempting to access the resources.
7541   *
7542   * @param { Callback<OnPermissionRequestEvent> } callback The triggered callback when the host application that web content from the specified origin is
7543   *     attempting to access the resources.
7544   * @returns { WebAttribute }
7545   * @syscap SystemCapability.Web.Webview.Core
7546   * @crossplatform
7547   * @atomicservice
7548   * @since 12
7549   */
7550  onPermissionRequest(callback: Callback<OnPermissionRequestEvent>): WebAttribute;
7551
7552  /**
7553   * Triggered when the host application that web content from the specified origin is requesting to capture screen.
7554   * @param { function } callback The triggered callback when the host application that web content from the specified origin is
7555   *     requesting to capture screen.
7556   * @returns { WebAttribute }
7557   * @syscap SystemCapability.Web.Webview.Core
7558   * @since 10
7559   */
7560  /**
7561   * Triggered when the host application that web content from the specified origin is requesting to capture screen.
7562   * @param { function } callback The triggered callback when the host application that web content from the specified origin is
7563   *     requesting to capture screen.
7564   * @returns { WebAttribute }
7565   * @syscap SystemCapability.Web.Webview.Core
7566   * @atomicservice
7567   * @since 11
7568   */
7569  /**
7570   * Triggered when the host application that web content from the specified origin is requesting to capture screen.
7571   * @param { Callback<OnScreenCaptureRequestEvent> } callback The triggered callback when the host application that web content from the specified origin is
7572   *     requesting to capture screen.
7573   * @returns { WebAttribute }
7574   * @syscap SystemCapability.Web.Webview.Core
7575   * @atomicservice
7576   * @since 12
7577   */
7578  onScreenCaptureRequest(callback: Callback<OnScreenCaptureRequestEvent>): WebAttribute;
7579
7580  /**
7581   * Triggered when called to allow custom display of the context menu.
7582   *
7583   * @param { function } callback The triggered callback when called to allow custom display of the context menu.
7584   * @returns { WebAttribute } If custom display return true.Otherwise, default display return false.
7585   * @syscap SystemCapability.Web.Webview.Core
7586   * @since 9
7587   */
7588  /**
7589   * Triggered when called to allow custom display of the context menu.
7590   *
7591   * @param { function } callback The triggered callback when called to allow custom display of the context menu.
7592   * @returns { WebAttribute } If custom display return true.Otherwise, default display return false.
7593   * @syscap SystemCapability.Web.Webview.Core
7594   * @atomicservice
7595   * @since 11
7596   */
7597  /**
7598   * Triggered when called to allow custom display of the context menu.
7599   *
7600   * @param { Callback<OnContextMenuShowEvent, boolean> } callback The triggered callback when called to allow custom display of the context menu.
7601   * @returns { WebAttribute } If custom display return true.Otherwise, default display return false.
7602   * @syscap SystemCapability.Web.Webview.Core
7603   * @atomicservice
7604   * @since 12
7605   */
7606  onContextMenuShow(callback: Callback<OnContextMenuShowEvent, boolean>): WebAttribute;
7607
7608  /**
7609   * Triggered when called to allow custom hide of the context menu.
7610   *
7611   * @param { OnContextMenuHideCallback } callback The triggered function when called to allow custom hide of the context menu.
7612   * @returns { WebAttribute }
7613   * @syscap SystemCapability.Web.Webview.Core
7614   * @atomicservice
7615   * @since 11
7616   */
7617  onContextMenuHide(callback: OnContextMenuHideCallback): WebAttribute;
7618
7619  /**
7620   * Set whether media playback needs to be triggered by user gestures.
7621   *
7622   * @param { boolean } access True if it needs to be triggered manually by the user else false.
7623   *    The default value is true.
7624   * @returns { WebAttribute }
7625   * @syscap SystemCapability.Web.Webview.Core
7626   * @since 9
7627   */
7628  /**
7629   * Set whether media playback needs to be triggered by user gestures.
7630   *
7631   * @param { boolean } access True if it needs to be triggered manually by the user else false.
7632   *    The default value is true.
7633   * @returns { WebAttribute }
7634   * @syscap SystemCapability.Web.Webview.Core
7635   * @crossplatform
7636   * @atomicservice
7637   * @since 11
7638   */
7639  mediaPlayGestureAccess(access: boolean): WebAttribute;
7640
7641  /**
7642   * Notify search result to host application through onSearchResultReceive.
7643   *
7644   * @param { function } callback Function Triggered when the host application call searchAllAsync.
7645   * or searchNext api on WebController and the request is valid.
7646   * @returns { WebAttribute }
7647   * @syscap SystemCapability.Web.Webview.Core
7648   * @since 9
7649   */
7650  /**
7651   * Notify search result to host application through onSearchResultReceive.
7652   *
7653   * @param { function } callback Function Triggered when the host application call searchAllAsync.
7654   * or searchNext api on WebController and the request is valid.
7655   * @returns { WebAttribute }
7656   * @syscap SystemCapability.Web.Webview.Core
7657   * @atomicservice
7658   * @since 11
7659   */
7660  /**
7661   * Notify search result to host application through onSearchResultReceive.
7662   *
7663   * @param { Callback<OnSearchResultReceiveEvent> } callback Function Triggered when the host application call searchAllAsync.
7664   * or searchNext api on WebController and the request is valid.
7665   * @returns { WebAttribute }
7666   * @syscap SystemCapability.Web.Webview.Core
7667   * @atomicservice
7668   * @since 12
7669   */
7670  onSearchResultReceive(callback: Callback<OnSearchResultReceiveEvent>): WebAttribute;
7671
7672  /**
7673   * Triggered when the scroll bar slides to the specified position.
7674   *
7675   * @param { function } callback Function Triggered when the scroll bar slides to the specified position.
7676   * @returns { WebAttribute }
7677   * @syscap SystemCapability.Web.Webview.Core
7678   * @since 9
7679   */
7680  /**
7681   * Triggered when the scroll bar slides to the specified position.
7682   *
7683   * @param { function } callback Function Triggered when the scroll bar slides to the specified position.
7684   * @returns { WebAttribute }
7685   * @syscap SystemCapability.Web.Webview.Core
7686   * @crossplatform
7687   * @atomicservice
7688   * @since 11
7689   */
7690  /**
7691   * Triggered when the scroll bar slides to the specified position.
7692   *
7693   * @param { Callback<OnScrollEvent> } callback Function Triggered when the scroll bar slides to the specified position.
7694   * @returns { WebAttribute }
7695   * @syscap SystemCapability.Web.Webview.Core
7696   * @crossplatform
7697   * @atomicservice
7698   * @since 12
7699   */
7700  onScroll(callback: Callback<OnScrollEvent>): WebAttribute;
7701
7702  /**
7703   * Triggered when the Web page receives an ssl Error.
7704   *
7705   * @param { function } callback The triggered callback when the Web page receives an ssl Error.
7706   * @returns { WebAttribute }
7707   * @syscap SystemCapability.Web.Webview.Core
7708   * @since 9
7709   */
7710  /**
7711   * Triggered when the Web page receives an ssl Error.
7712   *
7713   * @param { function } callback The triggered callback when the Web page receives an ssl Error.
7714   * @returns { WebAttribute }
7715   * @syscap SystemCapability.Web.Webview.Core
7716   * @atomicservice
7717   * @since 11
7718   */
7719  /**
7720   * Triggered when the Web page receives an ssl Error.
7721   *
7722   * @param { Callback<OnSslErrorEventReceiveEvent> } callback The triggered callback when the Web page receives an ssl Error.
7723   * @returns { WebAttribute }
7724   * @syscap SystemCapability.Web.Webview.Core
7725   * @atomicservice
7726   * @since 12
7727   */
7728  onSslErrorEventReceive(callback: Callback<OnSslErrorEventReceiveEvent>): WebAttribute;
7729
7730  /**
7731   * Triggered when the Web page receives an ssl Error.
7732   *
7733   * @param { OnSslErrorEventCallback } callback The triggered callback when the Web page receives an ssl Error.
7734   * @returns { WebAttribute }
7735   * @syscap SystemCapability.Web.Webview.Core
7736   * @atomicservice
7737   * @since 12
7738   */
7739  onSslErrorEvent(callback: OnSslErrorEventCallback): WebAttribute;
7740
7741  /**
7742   * Triggered when the Web page needs ssl client certificate from the user.
7743   *
7744   * @param { function } callback The triggered callback when needs ssl client certificate from the user.
7745   * @returns { WebAttribute }
7746   * @syscap SystemCapability.Web.Webview.Core
7747   * @since 9
7748   */
7749  /**
7750   * Triggered when the Web page needs ssl client certificate from the user.
7751   *
7752   * @param { function } callback The triggered callback when needs ssl client certificate from the user.
7753   * @returns { WebAttribute }
7754   * @syscap SystemCapability.Web.Webview.Core
7755   * @atomicservice
7756   * @since 11
7757   */
7758  /**
7759   * Triggered when the Web page needs ssl client certificate from the user.
7760   *
7761   * @param { Callback<OnClientAuthenticationEvent> } callback The triggered callback when needs ssl client certificate from the user.
7762   * @returns { WebAttribute }
7763   * @syscap SystemCapability.Web.Webview.Core
7764   * @atomicservice
7765   * @since 12
7766   */
7767  onClientAuthenticationRequest(callback: Callback<OnClientAuthenticationEvent>): WebAttribute;
7768
7769  /**
7770   * Triggered when web page requires the user to create a window.
7771   *
7772   * @param { function } callback The triggered callback when web page requires the user to create a window.
7773   * @returns { WebAttribute }
7774   * @syscap SystemCapability.Web.Webview.Core
7775   * @since 9
7776   */
7777  /**
7778   * Triggered when web page requires the user to create a window.
7779   *
7780   * @param { function } callback The triggered callback when web page requires the user to create a window.
7781   * @returns { WebAttribute }
7782   * @syscap SystemCapability.Web.Webview.Core
7783   * @atomicservice
7784   * @since 11
7785   */
7786  /**
7787   * Triggered when web page requires the user to create a window.
7788   *
7789   * @param {  Callback<OnWindowNewEvent> } callback The triggered callback when web page requires the user to create a window.
7790   * @returns { WebAttribute }
7791   * @syscap SystemCapability.Web.Webview.Core
7792   * @atomicservice
7793   * @since 12
7794   */
7795  onWindowNew(callback: Callback<OnWindowNewEvent>): WebAttribute;
7796
7797  /**
7798   * Triggered when web page requires the user to close a window.
7799   *
7800   * @param { function } callback The triggered callback when web page requires the user to close a window.
7801   * @returns { WebAttribute }
7802   * @syscap SystemCapability.Web.Webview.Core
7803   * @since 9
7804   */
7805  /**
7806   * Triggered when web page requires the user to close a window.
7807   *
7808   * @param { function } callback The triggered callback when web page requires the user to close a window.
7809   * @returns { WebAttribute }
7810   * @syscap SystemCapability.Web.Webview.Core
7811   * @atomicservice
7812   * @since 11
7813   */
7814  onWindowExit(callback: () => void): WebAttribute;
7815
7816  /**
7817   * Set whether multiple windows are supported.
7818   *
7819   * @param { boolean } multiWindow True if it needs to be triggered manually by the user else false.
7820   *    The default value is false.
7821   * @returns { WebAttribute }
7822   * @syscap SystemCapability.Web.Webview.Core
7823   * @since 9
7824   */
7825  /**
7826   * Set whether multiple windows are supported.
7827   *
7828   * @param { boolean } multiWindow True if it needs to be triggered manually by the user else false.
7829   *    The default value is false.
7830   * @returns { WebAttribute }
7831   * @syscap SystemCapability.Web.Webview.Core
7832   * @atomicservice
7833   * @since 11
7834   */
7835  multiWindowAccess(multiWindow: boolean): WebAttribute;
7836
7837  /**
7838   * Key events notify the application before the WebView consumes them.
7839   *
7840   * @param { function } callback Key event info.
7841   * @returns { WebAttribute } True if the application consumes key events else false.
7842   * @syscap SystemCapability.Web.Webview.Core
7843   * @since 9
7844   */
7845  /**
7846   * Key events notify the application before the WebView consumes them.
7847   *
7848   * @param { function } callback Key event info.
7849   * @returns { WebAttribute } True if the application consumes key events else false.
7850   * @syscap SystemCapability.Web.Webview.Core
7851   * @atomicservice
7852   * @since 11
7853   */
7854  onInterceptKeyEvent(callback: (event: KeyEvent) => boolean): WebAttribute;
7855
7856  /**
7857   * Set the font of webview standard font library. The default font is "sans serif".
7858   *
7859   * @param { string } family Standard font set series.
7860   * @returns { WebAttribute }
7861   * @syscap SystemCapability.Web.Webview.Core
7862   * @since 9
7863   */
7864  /**
7865   * Set the font of webview standard font library. The default font is "sans serif".
7866   *
7867   * @param { string } family Standard font set series.
7868   * @returns { WebAttribute }
7869   * @syscap SystemCapability.Web.Webview.Core
7870   * @atomicservice
7871   * @since 11
7872   */
7873  webStandardFont(family: string): WebAttribute;
7874
7875  /**
7876   * Set the font of webview serif font library. The default font is "serif".
7877   *
7878   * @param { string } family Serif font set series.
7879   * @returns { WebAttribute }
7880   * @syscap SystemCapability.Web.Webview.Core
7881   * @since 9
7882   */
7883  /**
7884   * Set the font of webview serif font library. The default font is "serif".
7885   *
7886   * @param { string } family Serif font set series.
7887   * @returns { WebAttribute }
7888   * @syscap SystemCapability.Web.Webview.Core
7889   * @atomicservice
7890   * @since 11
7891   */
7892  webSerifFont(family: string): WebAttribute;
7893
7894  /**
7895   * Set the font of webview sans serif font library. The default font is "sans-serif".
7896   *
7897   * @param { string } family Sans serif font set series.
7898   * @returns { WebAttribute }
7899   * @syscap SystemCapability.Web.Webview.Core
7900   * @since 9
7901   */
7902  /**
7903   * Set the font of webview sans serif font library. The default font is "sans-serif".
7904   *
7905   * @param { string } family Sans serif font set series.
7906   * @returns { WebAttribute }
7907   * @syscap SystemCapability.Web.Webview.Core
7908   * @atomicservice
7909   * @since 11
7910   */
7911  webSansSerifFont(family: string): WebAttribute;
7912
7913  /**
7914   * Set the font of webview fixed font library. The default font is "monospace".
7915   *
7916   * @param { string } family Fixed font set series.
7917   * @returns { WebAttribute }
7918   * @syscap SystemCapability.Web.Webview.Core
7919   * @since 9
7920   */
7921  /**
7922   * Set the font of webview fixed font library. The default font is "monospace".
7923   *
7924   * @param { string } family Fixed font set series.
7925   * @returns { WebAttribute }
7926   * @syscap SystemCapability.Web.Webview.Core
7927   * @atomicservice
7928   * @since 11
7929   */
7930  webFixedFont(family: string): WebAttribute;
7931
7932  /**
7933   * Set the font of webview fantasy font library. The default font is "fantasy".
7934   *
7935   * @param { string } family fantasy font set series.
7936   * @returns { WebAttribute }
7937   * @syscap SystemCapability.Web.Webview.Core
7938   * @since 9
7939   */
7940  /**
7941   * Set the font of webview fantasy font library. The default font is "fantasy".
7942   *
7943   * @param { string } family fantasy font set series.
7944   * @returns { WebAttribute }
7945   * @syscap SystemCapability.Web.Webview.Core
7946   * @atomicservice
7947   * @since 11
7948   */
7949  webFantasyFont(family: string): WebAttribute;
7950
7951  /**
7952   * Set the font of webview cursive font library. The default font is "cursive".
7953   *
7954   * @param { string } family Cursive font set series.
7955   * @returns { WebAttribute }
7956   * @syscap SystemCapability.Web.Webview.Core
7957   * @since 9
7958   */
7959  /**
7960   * Set the font of webview cursive font library. The default font is "cursive".
7961   *
7962   * @param { string } family Cursive font set series.
7963   * @returns { WebAttribute }
7964   * @syscap SystemCapability.Web.Webview.Core
7965   * @atomicservice
7966   * @since 11
7967   */
7968  webCursiveFont(family: string): WebAttribute;
7969
7970  /**
7971   * Set the default fixed font value of webview. The default value is 13, ranging from 1 to 72.
7972   *
7973   * @param { number } size Font size.
7974   * @returns { WebAttribute }
7975   * @syscap SystemCapability.Web.Webview.Core
7976   * @since 9
7977   */
7978  /**
7979   * Set the default fixed font value of webview. The default value is 13, ranging from 1 to 72.
7980   *
7981   * @param { number } size Font size.
7982   * @returns { WebAttribute }
7983   * @syscap SystemCapability.Web.Webview.Core
7984   * @atomicservice
7985   * @since 11
7986   */
7987  defaultFixedFontSize(size: number): WebAttribute;
7988
7989  /**
7990  * Set the default font value of webview. The default value is 16, ranging from 1 to 72.
7991   *
7992   * @param { number } size Font size.
7993   * @returns { WebAttribute }
7994   * @syscap SystemCapability.Web.Webview.Core
7995   * @since 9
7996   */
7997  /**
7998  * Set the default font value of webview. The default value is 16, ranging from 1 to 72.
7999   *
8000   * @param { number } size Font size.
8001   * @returns { WebAttribute }
8002   * @syscap SystemCapability.Web.Webview.Core
8003   * @atomicservice
8004   * @since 11
8005   */
8006  defaultFontSize(size: number): WebAttribute;
8007
8008  /**
8009  * Set the minimum value of webview font. The default value is 8, ranging from 1 to 72.
8010   *
8011   * @param { number } size Font size.
8012   * @returns { WebAttribute }
8013   * @syscap SystemCapability.Web.Webview.Core
8014   * @since 9
8015   */
8016  /**
8017  * Set the minimum value of webview font. The default value is 8, ranging from 1 to 72.
8018   *
8019   * @param { number } size Font size.
8020   * @returns { WebAttribute }
8021   * @syscap SystemCapability.Web.Webview.Core
8022   * @crossplatform
8023   * @atomicservice
8024   * @since 11
8025   */
8026  minFontSize(size: number): WebAttribute;
8027
8028  /**
8029  * Set the logical minimum value of webview font. The default value is 8, ranging from 1 to 72.
8030   *
8031   * @param { number } size Font size.
8032   * @returns { WebAttribute }
8033   * @syscap SystemCapability.Web.Webview.Core
8034   * @since 9
8035   */
8036  /**
8037  * Set the logical minimum value of webview font. The default value is 8, ranging from 1 to 72.
8038   *
8039   * @param { number } size Font size.
8040   * @returns { WebAttribute }
8041   * @syscap SystemCapability.Web.Webview.Core
8042   * @atomicservice
8043   * @since 11
8044   */
8045  minLogicalFontSize(size: number): WebAttribute;
8046
8047  /**
8048   * Set the default text encodingFormat value of webview. The default value is UTF-8.
8049   *
8050   * @param { string } textEncodingFormat text encodingFormat.
8051   * @returns { WebAttribute }
8052   * @syscap SystemCapability.Web.Webview.Core
8053   * @atomicservice
8054   * @since 12
8055   */
8056  defaultTextEncodingFormat(textEncodingFormat: string): WebAttribute;
8057
8058  /**
8059   * Whether force display the scroll bar.
8060   *
8061   * @param { boolean } enabled {@code true} means show; {@code false} otherwise.
8062   * @returns { WebAttribute }
8063   * @syscap SystemCapability.Web.Webview.Core
8064   * @atomicservice
8065   * @since 14
8066   */
8067  forceDisplayScrollBar(enabled: boolean): WebAttribute;
8068
8069  /**
8070   * Whether web component can load resource from network.
8071   *
8072   * @param { boolean } block {@code true} means it can't load resource from network; {@code false} otherwise.
8073   * @returns { WebAttribute }
8074   * @syscap SystemCapability.Web.Webview.Core
8075   * @since 9
8076   */
8077  /**
8078   * Whether web component can load resource from network.
8079   *
8080   * @param { boolean } block {@code true} means it can't load resource from network; {@code false} otherwise.
8081   * @returns { WebAttribute }
8082   * @syscap SystemCapability.Web.Webview.Core
8083   * @atomicservice
8084   * @since 11
8085   */
8086  blockNetwork(block: boolean): WebAttribute;
8087
8088  /**
8089   * Set whether paint horizontal scroll bar.
8090   *
8091   * @param { boolean } horizontalScrollBar True if it needs to paint horizontal scroll bar.
8092   *    The default value is true.
8093   * @returns { WebAttribute }
8094   * @syscap SystemCapability.Web.Webview.Core
8095   * @since 9
8096   */
8097  /**
8098   * Set whether paint horizontal scroll bar.
8099   *
8100   * @param { boolean } horizontalScrollBar True if it needs to paint horizontal scroll bar.
8101   *    The default value is true.
8102   * @returns { WebAttribute }
8103   * @syscap SystemCapability.Web.Webview.Core
8104   * @crossplatform
8105   * @atomicservice
8106   * @since 11
8107   */
8108  horizontalScrollBarAccess(horizontalScrollBar: boolean): WebAttribute;
8109
8110  /**
8111   * Set whether paint vertical scroll bar.
8112   *
8113   * @param { boolean } verticalScrollBar True if it needs to paint vertical scroll bar.
8114   *    The default value is true.
8115   * @returns { WebAttribute }
8116   * @syscap SystemCapability.Web.Webview.Core
8117   * @since 9
8118   */
8119  /**
8120   * Set whether paint vertical scroll bar.
8121   *
8122   * @param { boolean } verticalScrollBar True if it needs to paint vertical scroll bar.
8123   *    The default value is true.
8124   * @returns { WebAttribute }
8125   * @syscap SystemCapability.Web.Webview.Core
8126   * @crossplatform
8127   * @atomicservice
8128   * @since 11
8129   */
8130  verticalScrollBarAccess(verticalScrollBar: boolean): WebAttribute;
8131
8132  /**
8133   * Triggered when the application receive the url of an apple-touch-icon.
8134   *
8135   * @param { function } callback The triggered callback when the application receive an new url of an
8136   * apple-touch-icon.
8137   * @returns { WebAttribute }
8138   * @syscap SystemCapability.Web.Webview.Core
8139   * @since 9
8140   */
8141  /**
8142   * Triggered when the application receive the url of an apple-touch-icon.
8143   *
8144   * @param { function } callback The triggered callback when the application receive an new url of an
8145   * apple-touch-icon.
8146   * @returns { WebAttribute }
8147   * @syscap SystemCapability.Web.Webview.Core
8148   * @atomicservice
8149   * @since 11
8150   */
8151  /**
8152   * Triggered when the application receive the url of an apple-touch-icon.
8153   *
8154   * @param { Callback<OnTouchIconUrlReceivedEvent> } callback The triggered callback when the application receive an new url of an
8155   * apple-touch-icon.
8156   * @returns { WebAttribute }
8157   * @syscap SystemCapability.Web.Webview.Core
8158   * @atomicservice
8159   * @since 12
8160   */
8161  onTouchIconUrlReceived(callback: Callback<OnTouchIconUrlReceivedEvent>): WebAttribute;
8162
8163  /**
8164   * Triggered when the application receive a new favicon for the current web page.
8165   *
8166   * @param { function } callback The triggered callback when the application receive a new favicon for the
8167   * current web page.
8168   * @returns { WebAttribute }
8169   * @syscap SystemCapability.Web.Webview.Core
8170   * @since 9
8171   */
8172  /**
8173   * Triggered when the application receive a new favicon for the current web page.
8174   *
8175   * @param { function } callback The triggered callback when the application receive a new favicon for the
8176   * current web page.
8177   * @returns { WebAttribute }
8178   * @syscap SystemCapability.Web.Webview.Core
8179   * @atomicservice
8180   * @since 11
8181   */
8182  /**
8183   * Triggered when the application receive a new favicon for the current web page.
8184   *
8185   * @param { Callback<OnFaviconReceivedEvent> } callback The triggered callback when the application receive a new favicon for the
8186   * current web page.
8187   * @returns { WebAttribute }
8188   * @syscap SystemCapability.Web.Webview.Core
8189   * @atomicservice
8190   * @since 12
8191   */
8192  onFaviconReceived(callback: Callback<OnFaviconReceivedEvent>): WebAttribute;
8193
8194  /**
8195   * Triggered when previous page will no longer be drawn and next page begin to draw.
8196   *
8197   * @param { function } callback The triggered callback when previous page will no longer be drawn and next
8198   * page begin to draw.
8199   * @returns { WebAttribute }
8200   * @syscap SystemCapability.Web.Webview.Core
8201   * @since 9
8202   */
8203  /**
8204   * Triggered when previous page will no longer be drawn and next page begin to draw.
8205   *
8206   * @param { function } callback The triggered callback when previous page will no longer be drawn and next
8207   * page begin to draw.
8208   * @returns { WebAttribute }
8209   * @syscap SystemCapability.Web.Webview.Core
8210   * @crossplatform
8211   * @atomicservice
8212   * @since 11
8213   */
8214  /**
8215   * Triggered when previous page will no longer be drawn and next page begin to draw.
8216   *
8217   * @param {  Callback<OnPageVisibleEvent> } callback The triggered callback when previous page will no longer be drawn and next
8218   * page begin to draw.
8219   * @returns { WebAttribute }
8220   * @syscap SystemCapability.Web.Webview.Core
8221   * @crossplatform
8222   * @atomicservice
8223   * @since 12
8224   */
8225  onPageVisible(callback: Callback<OnPageVisibleEvent>): WebAttribute;
8226
8227  /**
8228   * Triggered when the form could be resubmitted.
8229   *
8230   * @param { function } callback The triggered callback to decision whether resend form data or not.
8231   * @returns { WebAttribute }
8232   * @syscap SystemCapability.Web.Webview.Core
8233   * @since 9
8234   */
8235  /**
8236   * Triggered when the form could be resubmitted.
8237   *
8238   * @param { function } callback The triggered callback to decision whether resend form data or not.
8239   * @returns { WebAttribute }
8240   * @syscap SystemCapability.Web.Webview.Core
8241   * @atomicservice
8242   * @since 11
8243   */
8244  /**
8245   * Triggered when the form could be resubmitted.
8246   *
8247   * @param { Callback<OnDataResubmittedEvent> } callback The triggered callback to decision whether resend form data or not.
8248   * @returns { WebAttribute }
8249   * @syscap SystemCapability.Web.Webview.Core
8250   * @atomicservice
8251   * @since 12
8252   */
8253  onDataResubmitted(callback: Callback<OnDataResubmittedEvent>): WebAttribute;
8254
8255  /**
8256   * Set whether enable pinch smooth mode.
8257   *
8258   * @param { boolean } isEnabled True if it needs to enable smooth mode.
8259   * @returns { WebAttribute }
8260   * @syscap SystemCapability.Web.Webview.Core
8261   * @since 9
8262   */
8263  /**
8264   * Set whether enable pinch smooth mode.
8265   *
8266   * @param { boolean } isEnabled True if it needs to enable smooth mode.
8267   * @returns { WebAttribute }
8268   * @syscap SystemCapability.Web.Webview.Core
8269   * @atomicservice
8270   * @since 11
8271   */
8272  pinchSmooth(isEnabled: boolean): WebAttribute;
8273
8274  /**
8275   * Whether the window can be open automatically through JavaScript.
8276   *
8277   * @param { boolean } flag If it is true, the window can be opened automatically through JavaScript.
8278   * If it is false and user behavior, the window can be opened automatically through JavaScript.
8279   * Otherwise, the window cannot be opened.
8280   * @returns { WebAttribute }
8281   * @syscap SystemCapability.Web.Webview.Core
8282   * @since 10
8283   */
8284  /**
8285   * Whether the window can be open automatically through JavaScript.
8286   *
8287   * @param { boolean } flag If it is true, the window can be opened automatically through JavaScript.
8288   * If it is false and user behavior, the window can be opened automatically through JavaScript.
8289   * Otherwise, the window cannot be opened.
8290   * @returns { WebAttribute }
8291   * @syscap SystemCapability.Web.Webview.Core
8292   * @atomicservice
8293   * @since 11
8294   */
8295  allowWindowOpenMethod(flag: boolean): WebAttribute;
8296
8297  /**
8298   * Triggered when the playing state of audio on web page changed.
8299   *
8300   * @param { function } callback The playing state of audio on web page.
8301   * @returns { WebAttribute }
8302   * @syscap SystemCapability.Web.Webview.Core
8303   * @since 10
8304   */
8305  /**
8306   * Triggered when the playing state of audio on web page changed.
8307   *
8308   * @param { function } callback The playing state of audio on web page.
8309   * @returns { WebAttribute }
8310   * @syscap SystemCapability.Web.Webview.Core
8311   * @atomicservice
8312   * @since 11
8313   */
8314  /**
8315   * Triggered when the playing state of audio on web page changed.
8316   *
8317   * @param { Callback<OnAudioStateChangedEvent> } callback The playing state of audio on web page.
8318   * @returns { WebAttribute }
8319   * @syscap SystemCapability.Web.Webview.Core
8320   * @atomicservice
8321   * @since 12
8322   */
8323  onAudioStateChanged(callback: Callback<OnAudioStateChangedEvent>): WebAttribute;
8324
8325  /**
8326   * Triggered when the first content rendering of web page.
8327   *
8328   * @param { function } callback
8329   * @returns { WebAttribute }
8330   * @syscap SystemCapability.Web.Webview.Core
8331   * @since 10
8332   */
8333  /**
8334   * Triggered when the first content rendering of web page.
8335   *
8336   * @param { function } callback
8337   * @returns { WebAttribute }
8338   * @syscap SystemCapability.Web.Webview.Core
8339   * @atomicservice
8340   * @since 11
8341   */
8342  /**
8343   * Triggered when the first content rendering of web page.
8344   *
8345   * @param { Callback<OnFirstContentfulPaintEvent> } callback
8346   * @returns { WebAttribute }
8347   * @syscap SystemCapability.Web.Webview.Core
8348   * @atomicservice
8349   * @since 12
8350   */
8351  onFirstContentfulPaint(callback: Callback<OnFirstContentfulPaintEvent>): WebAttribute;
8352
8353  /**
8354   * Called when the First rendering of meaningful content time(FMP)
8355   *
8356   * @param { OnFirstMeaningfulPaintCallback } callback Function Triggered when the firstMeaningfulPaint.
8357   * @returns { WebAttribute }
8358   * @syscap SystemCapability.Web.Webview.Core
8359   * @atomicservice
8360   * @since 12
8361   */
8362  onFirstMeaningfulPaint(callback: OnFirstMeaningfulPaintCallback): WebAttribute;
8363
8364  /**
8365   * Called when the Maximum content rendering time(LCP).
8366   *
8367   * @param { OnLargestContentfulPaintCallback } callback Function Triggered when the largestContentfulPaint.
8368   * @returns { WebAttribute }
8369   * @syscap SystemCapability.Web.Webview.Core
8370   * @atomicservice
8371   * @since 12
8372   */
8373  onLargestContentfulPaint(callback: OnLargestContentfulPaintCallback): WebAttribute;
8374
8375  /**
8376   * Triggered when the resources loading is intercepted.
8377   *
8378   * @param { function } callback The triggered callback when the resources loading is intercepted.
8379   * @returns { WebAttribute }
8380   * @syscap SystemCapability.Web.Webview.Core
8381   * @since 10
8382   */
8383  /**
8384   * Triggered when the resources loading is intercepted.
8385   *
8386   * @param { function } callback The triggered callback when the resources loading is intercepted.
8387   * @returns { WebAttribute }
8388   * @syscap SystemCapability.Web.Webview.Core
8389   * @crossplatform
8390   * @atomicservice
8391   * @since 11
8392   */
8393  /**
8394   * Triggered when the resources loading is intercepted.
8395   *
8396   * @param { Callback<OnLoadInterceptEvent, boolean> } callback The triggered callback when the resources loading is intercepted.
8397   * @returns { WebAttribute }
8398   * @syscap SystemCapability.Web.Webview.Core
8399   * @crossplatform
8400   * @atomicservice
8401   * @since 12
8402   */
8403  onLoadIntercept(callback: Callback<OnLoadInterceptEvent, boolean>): WebAttribute;
8404
8405  /**
8406   * Triggered when The controller is bound to the web component, this controller must be a WebviewController.
8407   * This callback can not use the interface about manipulating web pages.
8408   * @param { function } callback The triggered callback when web controller initialization success.
8409   * @returns { WebAttribute }
8410   * @syscap SystemCapability.Web.Webview.Core
8411   * @since 10
8412   */
8413  /**
8414   * Triggered when The controller is bound to the web component, this controller must be a WebviewController.
8415   * This callback can not use the interface about manipulating web pages.
8416   * @param { function } callback The triggered callback when web controller initialization success.
8417   * @returns { WebAttribute }
8418   * @syscap SystemCapability.Web.Webview.Core
8419   * @crossplatform
8420   * @atomicservice
8421   * @since 11
8422   */
8423  onControllerAttached(callback: () => void): WebAttribute;
8424
8425  /**
8426   * Triggered when the over scrolling.
8427   * @param { function } callback Function Triggered when the over scrolling.
8428   * @returns { WebAttribute }
8429   * @syscap SystemCapability.Web.Webview.Core
8430   * @since 10
8431   */
8432  /**
8433   * Triggered when the over scrolling.
8434   * @param { function } callback Function Triggered when the over scrolling.
8435   * @returns { WebAttribute }
8436   * @syscap SystemCapability.Web.Webview.Core
8437   * @atomicservice
8438   * @since 11
8439   */
8440  /**
8441   * Triggered when the over scrolling.
8442   * @param { Callback<OnOverScrollEvent> } callback Function Triggered when the over scrolling.
8443   * @returns { WebAttribute }
8444   * @syscap SystemCapability.Web.Webview.Core
8445   * @atomicservice
8446   * @since 12
8447   */
8448  onOverScroll(callback: Callback<OnOverScrollEvent>): WebAttribute;
8449
8450  /**
8451   * Called when received website security risk check result.
8452   *
8453   * @param { OnSafeBrowsingCheckResultCallback } callback - Function triggered when received website security risk check result.
8454   * @returns { WebAttribute }
8455   * @syscap SystemCapability.Web.Webview.Core
8456   * @atomicservice
8457   * @since 11
8458   */
8459  onSafeBrowsingCheckResult(callback: OnSafeBrowsingCheckResultCallback): WebAttribute;
8460
8461  /**
8462   * Called when the load committed.
8463   *
8464   * @param { OnNavigationEntryCommittedCallback } callback Function Triggered when a load committed.
8465   * @returns { WebAttribute }
8466   * @syscap SystemCapability.Web.Webview.Core
8467   * @atomicservice
8468   * @since 11
8469   */
8470  onNavigationEntryCommitted(callback: OnNavigationEntryCommittedCallback): WebAttribute;
8471
8472  /**
8473   * Called when tracker's cookie is prevented.
8474   *
8475   * @param { OnIntelligentTrackingPreventionCallback } callback - Callback triggered when tracker's cookie is prevented.
8476   * @returns { WebAttribute }
8477   * @syscap SystemCapability.Web.Webview.Core
8478   * @atomicservice
8479   * @since 12
8480   */
8481  onIntelligentTrackingPreventionResult(callback: OnIntelligentTrackingPreventionCallback): WebAttribute;
8482
8483  /**
8484   * Injects the JavaScripts before Webview creates the DOM tree, and then the JavaScript snippet will run after the document has been created.
8485   * @param { Array<ScriptItem> } scripts - The array of the JavaScripts to be injected.
8486   * @returns { WebAttribute }
8487   * @syscap SystemCapability.Web.Webview.Core
8488   * @atomicservice
8489   * @since 11
8490   */
8491  javaScriptOnDocumentStart(scripts: Array<ScriptItem>): WebAttribute;
8492
8493  /**
8494   * Injects the JavaScripts before Webview creates the DOM tree, and then the JavaScript snippet will run after the document has been created.
8495   * @param { Array<ScriptItem> } scripts - The array of the JavaScripts to be injected.
8496   * @returns { WebAttribute }
8497   * @syscap SystemCapability.Web.Webview.Core
8498   * @atomicservice
8499   * @since 11
8500   */
8501  javaScriptOnDocumentEnd(scripts: Array<ScriptItem>): WebAttribute;
8502
8503  /**
8504   * Set web layout Mode.
8505   * @param { WebLayoutMode } mode - The web layout mode, which can be {@link WebLayoutMode}.
8506   * @returns { WebAttribute }
8507   * @syscap SystemCapability.Web.Webview.Core
8508   * @atomicservice
8509   * @since 11
8510   */
8511  layoutMode(mode: WebLayoutMode): WebAttribute;
8512
8513  /**
8514   * Called to setting the nested scroll options.
8515   *
8516   * @param { NestedScrollOptions } value - options for nested scrolling.
8517   * @returns { WebAttribute } the attribute of the scroll.
8518   * @syscap SystemCapability.Web.Webview.Core
8519   * @atomicservice
8520   * @since 11
8521   */
8522  /**
8523   * Called to setting the nested scroll options.
8524   *
8525   * @param { NestedScrollOptions | NestedScrollOptionsExt } value - options for
8526   *     nested scrolling.
8527   * @returns { WebAttribute } the attribute of the scroll.
8528   * @syscap SystemCapability.Web.Webview.Core
8529   * @atomicservice
8530   * @since 14
8531   */
8532  nestedScroll(value: NestedScrollOptions | NestedScrollOptionsExt): WebAttribute;
8533
8534  /**
8535   * Sets the enable native embed mode for web.
8536   *
8537   * @param { boolean } mode - True if it needs to enable native embed mode.
8538   * @returns { WebAttribute }
8539   * @syscap SystemCapability.Web.Webview.Core
8540   * @atomicservice
8541   * @since 11
8542   */
8543  enableNativeEmbedMode(mode: boolean): WebAttribute;
8544
8545  /**
8546   * Register native pattern with specific tag and type.
8547   *
8548   * @param { string } tag - Tag name used by html webpage.
8549   * @param { string } type - Type of the tag.
8550   * @returns { WebAttribute }
8551   * @syscap SystemCapability.Web.Webview.Core
8552   * @atomicservice
8553   * @since 12
8554   */
8555  registerNativeEmbedRule(tag: string, type:string): WebAttribute;
8556
8557  /**
8558   * Triggered when embed lifecycle changes.
8559   *
8560   * @param { function } callback - Function Triggered when embed lifecycle changes.
8561   * @returns { WebAttribute }
8562   * @syscap SystemCapability.Web.Webview.Core
8563   * @atomicservice
8564   * @since 11
8565   */
8566  onNativeEmbedLifecycleChange(callback: (event: NativeEmbedDataInfo) => void): WebAttribute;
8567
8568  /**
8569   * Triggered when embed visibility changes.
8570   *
8571   * @param { OnNativeEmbedVisibilityChangeCallback } callback - Callback triggered when embed visibility changes.
8572   * @returns { WebAttribute }
8573   * @syscap SystemCapability.Web.Webview.Core
8574   * @since 12
8575   */
8576  onNativeEmbedVisibilityChange(callback: OnNativeEmbedVisibilityChangeCallback): WebAttribute;
8577
8578  /**
8579   * Triggered when gesture effect on embed tag.
8580   *
8581   * @param { function } callback - Function Triggered when gesture effect on embed tag.
8582   * @returns { WebAttribute }
8583   * @syscap SystemCapability.Web.Webview.Core
8584   * @atomicservice
8585   * @since 11
8586   */
8587  onNativeEmbedGestureEvent(callback: (event: NativeEmbedTouchInfo) => void): WebAttribute;
8588
8589  /**
8590   * Called to set copy option
8591   *
8592   * @param { CopyOptions } value - copy option.
8593   * @returns { WebAttribute } the attribute of the scroll.
8594   * @syscap SystemCapability.Web.Webview.Core
8595   * @atomicservice
8596   * @since 11
8597   */
8598  copyOptions(value: CopyOptions): WebAttribute;
8599
8600  /**
8601   * When the URL is about to be loaded into the current Web, it gives the application the opportunity to take control.
8602   * This will not called for POST requests, may be called for subframes and with non-HTTP(S) schemes.
8603   *
8604   * @param { OnOverrideUrlLoadingCallback } callback - The callback for onOverrideUrlLoading.
8605   * @returns { WebAttribute }
8606   * @syscap SystemCapability.Web.Webview.Core
8607   * @atomicservice
8608   * @since 12
8609   */
8610  onOverrideUrlLoading(callback: OnOverrideUrlLoadingCallback): WebAttribute;
8611
8612  /**
8613   * Enable whether to automatically resize text. The default value is true.
8614   *
8615   * @param { boolean } textAutosizing - Whether to enable text autosizing.
8616   * @returns { WebAttribute }
8617   * @syscap SystemCapability.Web.Webview.Core
8618   * @atomicservice
8619   * @since 12
8620   */
8621  textAutosizing(textAutosizing: boolean): WebAttribute;
8622
8623  /**
8624   * Enable app creates native media player to play web page media source.
8625   *
8626   * @param { NativeMediaPlayerConfig } config - The configuration of native media player.
8627   * @returns { WebAttribute }
8628   * @syscap SystemCapability.Web.Webview.Core
8629   * @atomicservice
8630   * @since 12
8631   */
8632  enableNativeMediaPlayer(config: NativeMediaPlayerConfig): WebAttribute;
8633
8634  /**
8635   * Triggered when render process not responding.
8636   *
8637   * @param { OnRenderProcessNotRespondingCallback } callback The triggered function when render process not responding.
8638   * @returns { WebAttribute }
8639   * @syscap SystemCapability.Web.Webview.Core
8640   * @since 12
8641   */
8642   onRenderProcessNotResponding(callback: OnRenderProcessNotRespondingCallback): WebAttribute;
8643
8644  /**
8645   * Triggered when the unresponsive render process becomes responsive.
8646   *
8647   * @param { OnRenderProcessRespondingCallback } callback The triggered function when the unresponsive render process becomes responsive.
8648   * @returns { WebAttribute }
8649   * @syscap SystemCapability.Web.Webview.Core
8650   * @since 12
8651   */
8652   onRenderProcessResponding(callback: OnRenderProcessRespondingCallback): WebAttribute;
8653
8654  /**
8655   * Set the custom text menu.
8656   *
8657   * @param { Array<ExpandedMenuItemOptions> } expandedMenuOptions - Customize text menu options.
8658   * @returns { WebAttribute }
8659   * @syscap SystemCapability.Web.Webview.Core
8660   * @since 12
8661   */
8662   selectionMenuOptions(expandedMenuOptions: Array<ExpandedMenuItemOptions>): WebAttribute;
8663
8664  /**
8665  * Triggered when the viewport-fit meta is detected for web page.
8666  *
8667  * @param { OnViewportFitChangedCallback } callback - The callback for onViewportFitChanged.
8668  * @returns { WebAttribute }
8669  * @syscap SystemCapability.Web.Webview.Core
8670  * @atomicservice
8671  * @since 12
8672  */
8673  onViewportFitChanged(callback: OnViewportFitChangedCallback): WebAttribute;
8674
8675  /**
8676   * When the soft keyboard is about to be displayed on the current Web,
8677   * it gives the application the opportunity to intercept the system keyboard attachment.
8678   * The application can return the keyboard options to control the web to
8679   * pull up the soft keyboard of the different type.
8680   *
8681   * @param { WebKeyboardCallback } callback - The callback for onInterceptKeyboardAttach.
8682   * @returns { WebAttribute }
8683   * @syscap SystemCapability.Web.Webview.Core
8684   * @atomicservice
8685   * @since 12
8686   */
8687  onInterceptKeyboardAttach(callback: WebKeyboardCallback): WebAttribute;
8688
8689  /**
8690   * Called when received Ads blocked results.
8691   * If blocked results exist at the end of page loading, the first call will be triggered.
8692   * To avoid performance issues, subsequent results will be periodically reported through this api.
8693   *
8694   * @param { OnAdsBlockedCallback } callback - The callback for OnAdsBlockedCallback.
8695   * @returns { WebAttribute }
8696   * @syscap SystemCapability.Web.Webview.Core
8697   * @atomicservice
8698   * @since 12
8699   */
8700  onAdsBlocked(callback: OnAdsBlockedCallback): WebAttribute;
8701
8702  /**
8703   * Set web avoidance keyboard mode. The default value is WebKeyboardAvoidMode.RESIZE_CONTENT.
8704   *
8705   * @param { WebKeyboardAvoidMode } mode - The web keyboard avoid mode, which can be {@link WebKeyboardAvoidMode}.
8706   * @returns { WebAttribute }
8707   * @syscap SystemCapability.Web.Webview.Core
8708   * @atomicservice
8709   * @since 12
8710   */
8711  keyboardAvoidMode(mode: WebKeyboardAvoidMode): WebAttribute;
8712
8713  /**
8714   * Set the custom text menu.
8715   *
8716   * @param { EditMenuOptions } editMenu - Customize text menu options.
8717   * @returns { WebAttribute }
8718   * @syscap SystemCapability.Web.Webview.Core
8719   * @since 12
8720   */
8721  editMenuOptions(editMenu: EditMenuOptions): WebAttribute;
8722
8723  /**
8724   * Enable or disable haptic feedback.
8725   *
8726   * @param { boolean } enabled - Default value is true, set false to disable haptic feedback.
8727   * @returns { WebAttribute }
8728   * @syscap SystemCapability.Web.Webview.Core
8729   * @since 13
8730   */
8731  enableHapticFeedback(enabled: boolean): WebAttribute;
8732
8733  /**
8734   * Bind to the selection menu.
8735   *
8736   * @param { WebElementType } elementType - Indicates the type of selection menu.
8737   * @param { CustomBuilder } content - Indicates the content of selection menu.
8738   * @param { WebResponseType } responseType - Indicates response type of selection menu.
8739   * @param { SelectionMenuOptionsExt } [options] - Indicates the options of selection menu.
8740   * @returns { WebAttribute }
8741   * @syscap SystemCapability.Web.Webview.Core
8742   * @since 13
8743   */
8744  bindSelectionMenu(elementType: WebElementType, content: CustomBuilder, responseType: WebResponseType,
8745      options?: SelectionMenuOptionsExt): WebAttribute;
8746}
8747
8748/**
8749 * Defines Web Component.
8750 *
8751 * @syscap SystemCapability.Web.Webview.Core
8752 * @atomicservice
8753 * @since 8
8754 */
8755/**
8756 * Defines Web Component.
8757 *
8758 * @syscap SystemCapability.Web.Webview.Core
8759 * @crossplatform
8760 * @since 10
8761 */
8762/**
8763 * Defines Web Component.
8764 *
8765 * @syscap SystemCapability.Web.Webview.Core
8766 * @crossplatform
8767 * @atomicservice
8768 * @since 11
8769 */
8770declare const Web: WebInterface;
8771
8772/**
8773 * Defines Web Component instance.
8774 *
8775 * @syscap SystemCapability.Web.Webview.Core
8776 * @since 8
8777 */
8778/**
8779 * Defines Web Component instance.
8780 *
8781 * @syscap SystemCapability.Web.Webview.Core
8782 * @atomicservice
8783 * @since 11
8784 */
8785declare const WebInstance: WebAttribute;
8786
8787/**
8788 * Defines the ssl error event.
8789 *
8790 * @typedef SslErrorEvent
8791 * @syscap SystemCapability.Web.Webview.Core
8792 * @atomicservice
8793 * @since 12
8794 */
8795declare interface SslErrorEvent {
8796  /**
8797   * Notifies the user of the operation behavior of the web component.
8798   *
8799   * @type { SslErrorHandler }
8800   * @syscap SystemCapability.Web.Webview.Core
8801   * @atomicservice
8802   * @since 12
8803   */
8804  handler: SslErrorHandler,
8805  /**
8806   * Error codes.
8807   *
8808   * @type { SslError }
8809   * @syscap SystemCapability.Web.Webview.Core
8810   * @atomicservice
8811   * @since 12
8812   */
8813  error: SslError
8814  /**
8815   * Request url.
8816   *
8817   * @type { string }
8818   * @syscap SystemCapability.Web.Webview.Core
8819   * @atomicservice
8820   * @since 12
8821   */
8822  url: string;
8823  /**
8824   * Original url.
8825   *
8826   * @type { string }
8827   * @syscap SystemCapability.Web.Webview.Core
8828   * @atomicservice
8829   * @since 12
8830   */
8831  originalUrl: string;
8832  /**
8833   * Referrer.
8834   *
8835   * @type { string }
8836   * @syscap SystemCapability.Web.Webview.Core
8837   * @atomicservice
8838   * @since 12
8839   */
8840  referrer: string;
8841  /**
8842   * Whether the error is fatal.
8843   *
8844   * @type { boolean }
8845   * @syscap SystemCapability.Web.Webview.Core
8846   * @atomicservice
8847   * @since 12
8848   */
8849  isFatalError: boolean;
8850  /**
8851   * Whether the request is main frame.
8852   *
8853   * @type { boolean }
8854   * @syscap SystemCapability.Web.Webview.Core
8855   * @atomicservice
8856   * @since 12
8857   */
8858  isMainFrame: boolean;
8859}
8860
8861/**
8862 * Defines the menu item option.
8863 *
8864 * @interface ExpandedMenuItemOptions
8865 * @syscap SystemCapability.Web.Webview.Core
8866 * @atomicservice
8867 * @since 12
8868 */
8869declare interface ExpandedMenuItemOptions {
8870  /**
8871   * Customize what the menu displays.
8872   *
8873   * @type { ResourceStr }
8874   * @syscap SystemCapability.Web.Webview.Core
8875   * @atomicservice
8876   * @since 12
8877   */
8878  content: ResourceStr;
8879  /**
8880   * Customize the icon before the menu displays content.
8881   *
8882   * @type { ?ResourceStr }
8883   * @syscap SystemCapability.Web.Webview.Core
8884   * @atomicservice
8885   * @since 12
8886   */
8887  startIcon?: ResourceStr;
8888  /**
8889   * Get the selected text information.
8890   *
8891   * @type { function }
8892   * @syscap SystemCapability.Web.Webview.Core
8893   * @atomicservice
8894   * @since 12
8895   */
8896  action: (selectedText: {plainText: string}) => void;
8897}
8898
8899/**
8900 * Define nested scroll options
8901 *
8902 * @interface NestedScrollOptionsExt
8903 * @syscap SystemCapability.Web.Webview.Core
8904 * @since 14
8905 */
8906declare interface NestedScrollOptionsExt {
8907  /**
8908   * Set NestedScrollMode when the scrollable component scrolls up
8909   *
8910   * @type { ?NestedScrollMode }
8911   * @syscap SystemCapability.Web.Webview.Core
8912   * @since 14
8913   */
8914  scrollUp?: NestedScrollMode;
8915
8916  /**
8917   * Set NestedScrollMode when the scrollable component scrolls down
8918   *
8919   * @type { ?NestedScrollMode }
8920   * @syscap SystemCapability.Web.Webview.Core
8921   * @since 14
8922   */
8923  scrollDown?: NestedScrollMode;
8924
8925  /**
8926   * Set NestedScrollMode when the scrollable component scrolls right
8927   *
8928   * @type { ?NestedScrollMode }
8929   * @syscap SystemCapability.Web.Webview.Core
8930   * @since 14
8931   */
8932  scrollRight?: NestedScrollMode;
8933
8934  /**
8935   * Set NestedScrollMode when the scrollable component scrolls left
8936   *
8937   * @type { ?NestedScrollMode }
8938   * @syscap SystemCapability.Web.Webview.Core
8939   * @since 14
8940   */
8941  scrollLeft?: NestedScrollMode;
8942}