@capgo/inappbrowser 8.1.13 → 8.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/docs.json CHANGED
@@ -7,8 +7,14 @@
7
7
  "methods": [
8
8
  {
9
9
  "name": "goBack",
10
- "signature": "() => Promise<{ canGoBack: boolean; }>",
11
- "parameters": [],
10
+ "signature": "(options?: { id?: string | undefined; } | undefined) => Promise<{ canGoBack: boolean; }>",
11
+ "parameters": [
12
+ {
13
+ "name": "options",
14
+ "docs": "",
15
+ "type": "{ id?: string | undefined; } | undefined"
16
+ }
17
+ ],
12
18
  "returns": "Promise<{ canGoBack: boolean; }>",
13
19
  "tags": [
14
20
  {
@@ -64,7 +70,7 @@
64
70
  "text": "0.5.0"
65
71
  }
66
72
  ],
67
- "docs": "Clear cookies of url",
73
+ "docs": "Clear cookies of url\nWhen `id` is omitted, applies to all open webviews.",
68
74
  "complexTypes": [
69
75
  "ClearCookieOptions"
70
76
  ],
@@ -72,8 +78,14 @@
72
78
  },
73
79
  {
74
80
  "name": "clearAllCookies",
75
- "signature": "() => Promise<any>",
76
- "parameters": [],
81
+ "signature": "(options?: { id?: string | undefined; } | undefined) => Promise<any>",
82
+ "parameters": [
83
+ {
84
+ "name": "options",
85
+ "docs": "",
86
+ "type": "{ id?: string | undefined; } | undefined"
87
+ }
88
+ ],
77
89
  "returns": "Promise<any>",
78
90
  "tags": [
79
91
  {
@@ -81,14 +93,20 @@
81
93
  "text": "6.5.0"
82
94
  }
83
95
  ],
84
- "docs": "Clear all cookies",
96
+ "docs": "Clear all cookies\nWhen `id` is omitted, applies to all open webviews.",
85
97
  "complexTypes": [],
86
98
  "slug": "clearallcookies"
87
99
  },
88
100
  {
89
101
  "name": "clearCache",
90
- "signature": "() => Promise<any>",
91
- "parameters": [],
102
+ "signature": "(options?: { id?: string | undefined; } | undefined) => Promise<any>",
103
+ "parameters": [
104
+ {
105
+ "name": "options",
106
+ "docs": "",
107
+ "type": "{ id?: string | undefined; } | undefined"
108
+ }
109
+ ],
92
110
  "returns": "Promise<any>",
93
111
  "tags": [
94
112
  {
@@ -96,7 +114,7 @@
96
114
  "text": "6.5.0"
97
115
  }
98
116
  ],
99
- "docs": "Clear cache",
117
+ "docs": "Clear cache\nWhen `id` is omitted, applies to all open webviews.",
100
118
  "complexTypes": [],
101
119
  "slug": "clearcache"
102
120
  },
@@ -140,7 +158,7 @@
140
158
  ],
141
159
  "returns": "Promise<any>",
142
160
  "tags": [],
143
- "docs": "Close the webview.",
161
+ "docs": "Close the webview.\nWhen `id` is omitted, closes the active webview.",
144
162
  "complexTypes": [
145
163
  "CloseWebviewOptions"
146
164
  ],
@@ -178,7 +196,7 @@
178
196
  },
179
197
  {
180
198
  "name": "openWebView",
181
- "signature": "(options: OpenWebViewOptions) => Promise<any>",
199
+ "signature": "(options: OpenWebViewOptions) => Promise<{ id: string; }>",
182
200
  "parameters": [
183
201
  {
184
202
  "name": "options",
@@ -186,8 +204,12 @@
186
204
  "type": "OpenWebViewOptions"
187
205
  }
188
206
  ],
189
- "returns": "Promise<any>",
207
+ "returns": "Promise<{ id: string; }>",
190
208
  "tags": [
209
+ {
210
+ "name": "returns",
211
+ "text": "Promise that resolves with the created webview id."
212
+ },
191
213
  {
192
214
  "name": "since",
193
215
  "text": "0.1.0"
@@ -201,33 +223,33 @@
201
223
  },
202
224
  {
203
225
  "name": "executeScript",
204
- "signature": "({ code }: { code: string; }) => Promise<void>",
226
+ "signature": "(options: { code: string; id?: string; }) => Promise<void>",
205
227
  "parameters": [
206
228
  {
207
- "name": "__0",
229
+ "name": "options",
208
230
  "docs": "",
209
- "type": "{ code: string; }"
231
+ "type": "{ code: string; id?: string | undefined; }"
210
232
  }
211
233
  ],
212
234
  "returns": "Promise<void>",
213
235
  "tags": [],
214
- "docs": "Injects JavaScript code into the InAppBrowser window.",
236
+ "docs": "Injects JavaScript code into the InAppBrowser window.\nWhen `id` is omitted, executes in all open webviews.",
215
237
  "complexTypes": [],
216
238
  "slug": "executescript"
217
239
  },
218
240
  {
219
241
  "name": "postMessage",
220
- "signature": "(options: { detail: Record<string, any>; }) => Promise<void>",
242
+ "signature": "(options: { detail: Record<string, any>; id?: string; }) => Promise<void>",
221
243
  "parameters": [
222
244
  {
223
245
  "name": "options",
224
246
  "docs": "",
225
- "type": "{ detail: Record<string, any>; }"
247
+ "type": "{ detail: Record<string, any>; id?: string | undefined; }"
226
248
  }
227
249
  ],
228
250
  "returns": "Promise<void>",
229
251
  "tags": [],
230
- "docs": "Sends an event to the webview(inappbrowser). you can listen to this event in the inappbrowser JS with window.addEventListener(\"messageFromNative\", listenerFunc: (event: Record<string, any>) => void)\ndetail is the data you want to send to the webview, it's a requirement of Capacitor we cannot send direct objects\nYour object has to be serializable to JSON, so no functions or other non-JSON-serializable types are allowed.",
252
+ "docs": "Sends an event to the webview(inappbrowser). you can listen to this event in the inappbrowser JS with window.addEventListener(\"messageFromNative\", listenerFunc: (event: Record<string, any>) => void)\ndetail is the data you want to send to the webview, it's a requirement of Capacitor we cannot send direct objects\nYour object has to be serializable to JSON, so no functions or other non-JSON-serializable types are allowed.\nWhen `id` is omitted, broadcasts to all open webviews.",
231
253
  "complexTypes": [
232
254
  "Record"
233
255
  ],
@@ -235,17 +257,17 @@
235
257
  },
236
258
  {
237
259
  "name": "setUrl",
238
- "signature": "(options: { url: string; }) => Promise<any>",
260
+ "signature": "(options: { url: string; id?: string; }) => Promise<any>",
239
261
  "parameters": [
240
262
  {
241
263
  "name": "options",
242
264
  "docs": "",
243
- "type": "{ url: string; }"
265
+ "type": "{ url: string; id?: string | undefined; }"
244
266
  }
245
267
  ],
246
268
  "returns": "Promise<any>",
247
269
  "tags": [],
248
- "docs": "Sets the URL of the webview.",
270
+ "docs": "Sets the URL of the webview.\nWhen `id` is omitted, targets the active webview.",
249
271
  "complexTypes": [],
250
272
  "slug": "seturl"
251
273
  },
@@ -362,7 +384,7 @@
362
384
  },
363
385
  {
364
386
  "name": "addListener",
365
- "signature": "(eventName: 'messageFromWebview', listenerFunc: (event: { detail: Record<string, any>; }) => void) => Promise<PluginListenerHandle>",
387
+ "signature": "(eventName: 'messageFromWebview', listenerFunc: (event: { id?: string; detail?: Record<string, any>; rawMessage?: string; }) => void) => Promise<PluginListenerHandle>",
366
388
  "parameters": [
367
389
  {
368
390
  "name": "eventName",
@@ -372,7 +394,7 @@
372
394
  {
373
395
  "name": "listenerFunc",
374
396
  "docs": "",
375
- "type": "(event: { detail: Record<string, any>; }) => void"
397
+ "type": "(event: { id?: string | undefined; detail?: Record<string, any> | undefined; rawMessage?: string | undefined; }) => void"
376
398
  }
377
399
  ],
378
400
  "returns": "Promise<PluginListenerHandle>",
@@ -386,7 +408,7 @@
386
408
  },
387
409
  {
388
410
  "name": "addListener",
389
- "signature": "(eventName: 'browserPageLoaded', listenerFunc: () => void) => Promise<PluginListenerHandle>",
411
+ "signature": "(eventName: 'browserPageLoaded', listenerFunc: (event: { id?: string; }) => void) => Promise<PluginListenerHandle>",
390
412
  "parameters": [
391
413
  {
392
414
  "name": "eventName",
@@ -396,7 +418,7 @@
396
418
  {
397
419
  "name": "listenerFunc",
398
420
  "docs": "",
399
- "type": "() => void"
421
+ "type": "(event: { id?: string | undefined; }) => void"
400
422
  }
401
423
  ],
402
424
  "returns": "Promise<PluginListenerHandle>",
@@ -409,7 +431,7 @@
409
431
  },
410
432
  {
411
433
  "name": "addListener",
412
- "signature": "(eventName: 'pageLoadError', listenerFunc: () => void) => Promise<PluginListenerHandle>",
434
+ "signature": "(eventName: 'pageLoadError', listenerFunc: (event: { id?: string; }) => void) => Promise<PluginListenerHandle>",
413
435
  "parameters": [
414
436
  {
415
437
  "name": "eventName",
@@ -419,7 +441,7 @@
419
441
  {
420
442
  "name": "listenerFunc",
421
443
  "docs": "",
422
- "type": "() => void"
444
+ "type": "(event: { id?: string | undefined; }) => void"
423
445
  }
424
446
  ],
425
447
  "returns": "Promise<PluginListenerHandle>",
@@ -447,8 +469,14 @@
447
469
  },
448
470
  {
449
471
  "name": "reload",
450
- "signature": "() => Promise<any>",
451
- "parameters": [],
472
+ "signature": "(options?: { id?: string | undefined; } | undefined) => Promise<any>",
473
+ "parameters": [
474
+ {
475
+ "name": "options",
476
+ "docs": "",
477
+ "type": "{ id?: string | undefined; } | undefined"
478
+ }
479
+ ],
452
480
  "returns": "Promise<any>",
453
481
  "tags": [
454
482
  {
@@ -462,12 +490,12 @@
462
490
  },
463
491
  {
464
492
  "name": "updateDimensions",
465
- "signature": "(options: DimensionOptions) => Promise<void>",
493
+ "signature": "(options: DimensionOptions & { id?: string; }) => Promise<void>",
466
494
  "parameters": [
467
495
  {
468
496
  "name": "options",
469
497
  "docs": "Dimension options (width, height, x, y)",
470
- "type": "DimensionOptions"
498
+ "type": "DimensionOptions & { id?: string | undefined; }"
471
499
  }
472
500
  ],
473
501
  "returns": "Promise<void>",
@@ -481,7 +509,7 @@
481
509
  "text": "Promise that resolves when dimensions are updated"
482
510
  }
483
511
  ],
484
- "docs": "Update the dimensions of the webview.\nAllows changing the size and position of the webview at runtime.",
512
+ "docs": "Update the dimensions of the webview.\nAllows changing the size and position of the webview at runtime.\nWhen `id` is omitted, targets the active webview.",
485
513
  "complexTypes": [
486
514
  "DimensionOptions"
487
515
  ],
@@ -543,6 +571,13 @@
543
571
  "tags": [],
544
572
  "methods": [],
545
573
  "properties": [
574
+ {
575
+ "name": "id",
576
+ "tags": [],
577
+ "docs": "Target webview id.\nWhen omitted, applies to all open webviews.",
578
+ "complexTypes": [],
579
+ "type": "string | undefined"
580
+ },
546
581
  {
547
582
  "name": "url",
548
583
  "tags": [],
@@ -612,6 +647,13 @@
612
647
  "tags": [],
613
648
  "methods": [],
614
649
  "properties": [
650
+ {
651
+ "name": "id",
652
+ "tags": [],
653
+ "docs": "Target webview id to close. If omitted, closes the active webview.",
654
+ "complexTypes": [],
655
+ "type": "string | undefined"
656
+ },
615
657
  {
616
658
  "name": "isAnimated",
617
659
  "tags": [
@@ -1522,6 +1564,13 @@
1522
1564
  "tags": [],
1523
1565
  "methods": [],
1524
1566
  "properties": [
1567
+ {
1568
+ "name": "id",
1569
+ "tags": [],
1570
+ "docs": "Webview instance id.",
1571
+ "complexTypes": [],
1572
+ "type": "string | undefined"
1573
+ },
1525
1574
  {
1526
1575
  "name": "url",
1527
1576
  "tags": [
@@ -1543,6 +1592,13 @@
1543
1592
  "tags": [],
1544
1593
  "methods": [],
1545
1594
  "properties": [
1595
+ {
1596
+ "name": "id",
1597
+ "tags": [],
1598
+ "docs": "Webview instance id.",
1599
+ "complexTypes": [],
1600
+ "type": "string | undefined"
1601
+ },
1546
1602
  {
1547
1603
  "name": "url",
1548
1604
  "tags": [
@@ -1,5 +1,9 @@
1
1
  import type { PluginListenerHandle } from '@capacitor/core';
2
2
  export interface UrlEvent {
3
+ /**
4
+ * Webview instance id.
5
+ */
6
+ id?: string;
3
7
  /**
4
8
  * Emit when the url changes
5
9
  *
@@ -8,6 +12,10 @@ export interface UrlEvent {
8
12
  url: string;
9
13
  }
10
14
  export interface BtnEvent {
15
+ /**
16
+ * Webview instance id.
17
+ */
18
+ id?: string;
11
19
  /**
12
20
  * Emit when a button is clicked.
13
21
  *
@@ -62,6 +70,11 @@ export interface GetCookieOptions {
62
70
  includeHttpOnly?: boolean;
63
71
  }
64
72
  export interface ClearCookieOptions {
73
+ /**
74
+ * Target webview id.
75
+ * When omitted, applies to all open webviews.
76
+ */
77
+ id?: string;
65
78
  url: string;
66
79
  }
67
80
  export interface Credentials {
@@ -108,6 +121,10 @@ export interface DisclaimerOptions {
108
121
  cancelBtn: string;
109
122
  }
110
123
  export interface CloseWebviewOptions {
124
+ /**
125
+ * Target webview id to close. If omitted, closes the active webview.
126
+ */
127
+ id?: string;
111
128
  /**
112
129
  * Whether the webview closing is animated or not, ios only
113
130
  * @default true
@@ -601,7 +618,9 @@ export interface InAppBrowserPlugin {
601
618
  * @since 7.21.0
602
619
  * @returns Promise that resolves with true if navigation was possible, false otherwise
603
620
  */
604
- goBack(): Promise<{
621
+ goBack(options?: {
622
+ id?: string;
623
+ }): Promise<{
605
624
  canGoBack: boolean;
606
625
  }>;
607
626
  /**
@@ -612,22 +631,29 @@ export interface InAppBrowserPlugin {
612
631
  open(options: OpenOptions): Promise<any>;
613
632
  /**
614
633
  * Clear cookies of url
634
+ * When `id` is omitted, applies to all open webviews.
615
635
  *
616
636
  * @since 0.5.0
617
637
  */
618
638
  clearCookies(options: ClearCookieOptions): Promise<any>;
619
639
  /**
620
640
  * Clear all cookies
641
+ * When `id` is omitted, applies to all open webviews.
621
642
  *
622
643
  * @since 6.5.0
623
644
  */
624
- clearAllCookies(): Promise<any>;
645
+ clearAllCookies(options?: {
646
+ id?: string;
647
+ }): Promise<any>;
625
648
  /**
626
649
  * Clear cache
650
+ * When `id` is omitted, applies to all open webviews.
627
651
  *
628
652
  * @since 6.5.0
629
653
  */
630
- clearCache(): Promise<any>;
654
+ clearCache(options?: {
655
+ id?: string;
656
+ }): Promise<any>;
631
657
  /**
632
658
  * Get cookies for a specific URL.
633
659
  * @param options The options, including the URL to get cookies for.
@@ -636,6 +662,7 @@ export interface InAppBrowserPlugin {
636
662
  getCookies(options: GetCookieOptions): Promise<Record<string, string>>;
637
663
  /**
638
664
  * Close the webview.
665
+ * When `id` is omitted, closes the active webview.
639
666
  */
640
667
  close(options?: CloseWebviewOptions): Promise<any>;
641
668
  /**
@@ -659,28 +686,37 @@ export interface InAppBrowserPlugin {
659
686
  * - `window.mobileApp.close()`: Closes the webview from JavaScript
660
687
  * - `window.mobileApp.postMessage({detail: {message: "myMessage"}})`: Sends a message from the webview to the app, detail object is the data you want to send to the webview
661
688
  *
689
+ * @returns Promise that resolves with the created webview id.
662
690
  * @since 0.1.0
663
691
  */
664
- openWebView(options: OpenWebViewOptions): Promise<any>;
692
+ openWebView(options: OpenWebViewOptions): Promise<{
693
+ id: string;
694
+ }>;
665
695
  /**
666
696
  * Injects JavaScript code into the InAppBrowser window.
697
+ * When `id` is omitted, executes in all open webviews.
667
698
  */
668
- executeScript({ code }: {
699
+ executeScript(options: {
669
700
  code: string;
701
+ id?: string;
670
702
  }): Promise<void>;
671
703
  /**
672
704
  * Sends an event to the webview(inappbrowser). you can listen to this event in the inappbrowser JS with window.addEventListener("messageFromNative", listenerFunc: (event: Record<string, any>) => void)
673
705
  * detail is the data you want to send to the webview, it's a requirement of Capacitor we cannot send direct objects
674
706
  * Your object has to be serializable to JSON, so no functions or other non-JSON-serializable types are allowed.
707
+ * When `id` is omitted, broadcasts to all open webviews.
675
708
  */
676
709
  postMessage(options: {
677
710
  detail: Record<string, any>;
711
+ id?: string;
678
712
  }): Promise<void>;
679
713
  /**
680
714
  * Sets the URL of the webview.
715
+ * When `id` is omitted, targets the active webview.
681
716
  */
682
717
  setUrl(options: {
683
718
  url: string;
719
+ id?: string;
684
720
  }): Promise<any>;
685
721
  /**
686
722
  * Listen for url change, only for openWebView
@@ -710,16 +746,22 @@ export interface InAppBrowserPlugin {
710
746
  * This method is inject at runtime in the webview
711
747
  */
712
748
  addListener(eventName: 'messageFromWebview', listenerFunc: (event: {
713
- detail: Record<string, any>;
749
+ id?: string;
750
+ detail?: Record<string, any>;
751
+ rawMessage?: string;
714
752
  }) => void): Promise<PluginListenerHandle>;
715
753
  /**
716
754
  * Will be triggered when page is loaded
717
755
  */
718
- addListener(eventName: 'browserPageLoaded', listenerFunc: () => void): Promise<PluginListenerHandle>;
756
+ addListener(eventName: 'browserPageLoaded', listenerFunc: (event: {
757
+ id?: string;
758
+ }) => void): Promise<PluginListenerHandle>;
719
759
  /**
720
760
  * Will be triggered when page load error
721
761
  */
722
- addListener(eventName: 'pageLoadError', listenerFunc: () => void): Promise<PluginListenerHandle>;
762
+ addListener(eventName: 'pageLoadError', listenerFunc: (event: {
763
+ id?: string;
764
+ }) => void): Promise<PluginListenerHandle>;
723
765
  /**
724
766
  * Remove all listeners for this plugin.
725
767
  *
@@ -731,15 +773,20 @@ export interface InAppBrowserPlugin {
731
773
  *
732
774
  * @since 1.0.0
733
775
  */
734
- reload(): Promise<any>;
776
+ reload(options?: {
777
+ id?: string;
778
+ }): Promise<any>;
735
779
  /**
736
780
  * Update the dimensions of the webview.
737
781
  * Allows changing the size and position of the webview at runtime.
782
+ * When `id` is omitted, targets the active webview.
738
783
  *
739
784
  * @param options Dimension options (width, height, x, y)
740
785
  * @returns Promise that resolves when dimensions are updated
741
786
  */
742
- updateDimensions(options: DimensionOptions): Promise<void>;
787
+ updateDimensions(options: DimensionOptions & {
788
+ id?: string;
789
+ }): Promise<void>;
743
790
  }
744
791
  /**
745
792
  * JavaScript APIs available in the InAppBrowser WebView.
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAuBA,MAAM,CAAN,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,kCAAe,CAAA;IACf,kCAAe,CAAA;AACjB,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B;AACD,MAAM,CAAN,IAAY,WAqBX;AArBD,WAAY,WAAW;IACrB;;;OAGG;IACH,oCAAqB,CAAA;IACrB;;;OAGG;IACH,kCAAmB,CAAA;IACnB;;;OAGG;IACH,wCAAyB,CAAA;IACzB;;;OAGG;IACH,8BAAe,CAAA;AACjB,CAAC,EArBW,WAAW,KAAX,WAAW,QAqBtB;AAED,MAAM,CAAN,IAAY,gBASX;AATD,WAAY,gBAAgB;IAC1B;;OAEG;IACH,mCAAe,CAAA;IACf;;OAEG;IACH,iDAA6B,CAAA;AAC/B,CAAC,EATW,gBAAgB,KAAhB,gBAAgB,QAS3B","sourcesContent":["import type { PluginListenerHandle } from '@capacitor/core';\n\nexport interface UrlEvent {\n /**\n * Emit when the url changes\n *\n * @since 0.0.1\n */\n url: string;\n}\nexport interface BtnEvent {\n /**\n * Emit when a button is clicked.\n *\n * @since 0.0.1\n */\n url: string;\n}\n\nexport type UrlChangeListener = (state: UrlEvent) => void;\nexport type ConfirmBtnListener = (state: BtnEvent) => void;\nexport type ButtonNearListener = (state: object) => void;\n\nexport enum BackgroundColor {\n WHITE = 'white',\n BLACK = 'black',\n}\nexport enum ToolBarType {\n /**\n * Shows a simple toolbar with just a close button and share button\n * @since 0.1.0\n */\n ACTIVITY = 'activity',\n /**\n * Shows a simple toolbar with just a close button\n * @since 7.6.8\n */\n COMPACT = 'compact',\n /**\n * Shows a full navigation toolbar with back/forward buttons\n * @since 0.1.0\n */\n NAVIGATION = 'navigation',\n /**\n * Shows no toolbar\n * @since 0.1.0\n */\n BLANK = 'blank',\n}\n\nexport enum InvisibilityMode {\n /**\n * WebView is aware it is hidden (dimensions may be zero).\n */\n AWARE = 'AWARE',\n /**\n * WebView is hidden but reports fullscreen dimensions (uses alpha=0 to remain invisible).\n */\n FAKE_VISIBLE = 'FAKE_VISIBLE',\n}\n\nexport interface Headers {\n [key: string]: string;\n}\n\nexport interface GetCookieOptions {\n url: string;\n includeHttpOnly?: boolean;\n}\n\nexport interface ClearCookieOptions {\n url: string;\n}\n\nexport interface Credentials {\n username: string;\n password: string;\n}\n\nexport interface OpenOptions {\n /**\n * Target URL to load.\n * @since 0.1.0\n */\n url: string;\n /**\n * if true, the browser will be presented after the page is loaded, if false, the browser will be presented immediately.\n * @since 0.1.0\n */\n isPresentAfterPageLoad?: boolean;\n /**\n * if true the deeplink will not be opened, if false the deeplink will be opened when clicked on the link\n * @since 0.1.0\n */\n preventDeeplink?: boolean;\n}\n\nexport interface DisclaimerOptions {\n /**\n * Title of the disclaimer dialog\n * @default \"Title\"\n */\n title: string;\n /**\n * Message shown in the disclaimer dialog\n * @default \"Message\"\n */\n message: string;\n /**\n * Text for the confirm button\n * @default \"Confirm\"\n */\n confirmBtn: string;\n /**\n * Text for the cancel button\n * @default \"Cancel\"\n */\n cancelBtn: string;\n}\n\nexport interface CloseWebviewOptions {\n /**\n * Whether the webview closing is animated or not, ios only\n * @default true\n */\n isAnimated?: boolean;\n}\n\nexport interface OpenWebViewOptions {\n /**\n * Target URL to load.\n * @since 0.1.0\n * @example \"https://capgo.app\"\n */\n url: string;\n /**\n * Headers to send with the request.\n * @since 0.1.0\n * @example\n * headers: {\n * \"Custom-Header\": \"test-value\",\n * \"Authorization\": \"Bearer test-token\"\n * }\n * Test URL: https://www.whatismybrowser.com/detect/what-http-headers-is-my-browser-sending/\n */\n headers?: Headers;\n /**\n * Credentials to send with the request and all subsequent requests for the same host.\n * @since 6.1.0\n * @example\n * credentials: {\n * username: \"test-user\",\n * password: \"test-pass\"\n * }\n * Test URL: https://www.whatismybrowser.com/detect/what-http-headers-is-my-browser-sending/\n */\n credentials?: Credentials;\n /**\n * materialPicker: if true, uses Material Design theme for date and time pickers on Android.\n * This improves the appearance of HTML date inputs to use modern Material Design UI instead of the old style pickers.\n * @since 7.4.1\n * @default false\n * @example\n * materialPicker: true\n * Test URL: https://show-picker.glitch.me/demo.html\n */\n materialPicker?: boolean;\n /**\n * JavaScript Interface:\n * The webview automatically injects a JavaScript interface providing:\n * - `window.mobileApp.close()`: Closes the webview from JavaScript\n * - `window.mobileApp.postMessage(obj)`: Sends a message to the app (listen via \"messageFromWebview\" event)\n * - `window.mobileApp.hide()` / `window.mobileApp.show()` when allowWebViewJsVisibilityControl is true in CapacitorConfig\n *\n * @example\n * // In your webpage loaded in the webview:\n * document.getElementById(\"closeBtn\").addEventListener(\"click\", () => {\n * window.mobileApp.close();\n * });\n *\n * // Send data to the app\n * window.mobileApp.postMessage({ action: \"login\", data: { user: \"test\" }});\n *\n * @since 6.10.0\n */\n jsInterface?: never; // This property doesn't exist, it's just for documentation\n /**\n * Share options for the webview. When provided, shows a disclaimer dialog before sharing content.\n * This is useful for:\n * - Warning users about sharing sensitive information\n * - Getting user consent before sharing\n * - Explaining what will be shared\n * - Complying with privacy regulations\n *\n * Note: shareSubject is required when using shareDisclaimer\n * @since 0.1.0\n * @example\n * shareDisclaimer: {\n * title: \"Disclaimer\",\n * message: \"This is a test disclaimer\",\n * confirmBtn: \"Accept\",\n * cancelBtn: \"Decline\"\n * }\n * Test URL: https://capgo.app\n */\n shareDisclaimer?: DisclaimerOptions;\n /**\n * Toolbar type determines the appearance and behavior of the browser's toolbar\n * - \"activity\": Shows a simple toolbar with just a close button and share button\n * - \"navigation\": Shows a full navigation toolbar with back/forward buttons\n * - \"blank\": Shows no toolbar\n * - \"\": Default toolbar with close button\n * @since 0.1.0\n * @default ToolBarType.DEFAULT\n * @example\n * toolbarType: ToolBarType.ACTIVITY,\n * title: \"Activity Toolbar Test\"\n * Test URL: https://capgo.app\n */\n toolbarType?: ToolBarType;\n /**\n * Subject text for sharing. Required when using shareDisclaimer.\n * This text will be used as the subject line when sharing content.\n * @since 0.1.0\n * @example \"Share this page\"\n */\n shareSubject?: string;\n /**\n * Title of the browser\n * @since 0.1.0\n * @default \"New Window\"\n * @example \"Camera Test\"\n */\n title?: string;\n /**\n * Background color of the browser\n * @since 0.1.0\n * @default BackgroundColor.BLACK\n */\n backgroundColor?: BackgroundColor;\n /**\n * If true, enables native navigation gestures within the webview.\n * - Android: Native back button navigates within webview history\n * - iOS: Enables swipe left/right gestures for back/forward navigation\n * @default false (Android), true (iOS - enabled by default)\n * @example\n * activeNativeNavigationForWebview: true,\n * disableGoBackOnNativeApplication: true\n * Test URL: https://capgo.app\n */\n activeNativeNavigationForWebview?: boolean;\n /**\n * Disable the possibility to go back on native application,\n * useful to force user to stay on the webview, Android only\n * @default false\n * @example\n * disableGoBackOnNativeApplication: true\n * Test URL: https://capgo.app\n */\n disableGoBackOnNativeApplication?: boolean;\n /**\n * Open url in a new window fullscreen\n * isPresentAfterPageLoad: if true, the browser will be presented after the page is loaded, if false, the browser will be presented immediately.\n * @since 0.1.0\n * @default false\n * @example\n * isPresentAfterPageLoad: true,\n * preShowScript: \"await import('https://unpkg.com/darkreader@4.9.89/darkreader.js');\\nDarkReader.enable({ brightness: 100, contrast: 90, sepia: 10 });\"\n * Test URL: https://capgo.app\n */\n isPresentAfterPageLoad?: boolean;\n /**\n * Whether the website in the webview is inspectable or not, ios only\n * @default false\n */\n isInspectable?: boolean;\n /**\n * Whether the webview opening is animated or not, ios only\n * @default true\n */\n isAnimated?: boolean;\n /**\n * Shows a reload button that reloads the web page\n * @since 1.0.15\n * @default false\n * @example\n * showReloadButton: true\n * Test URL: https://capgo.app\n */\n showReloadButton?: boolean;\n /**\n * CloseModal: if true a confirm will be displayed when user clicks on close button, if false the browser will be closed immediately.\n * @since 1.1.0\n * @default false\n * @example\n * closeModal: true,\n * closeModalTitle: \"Close Window\",\n * closeModalDescription: \"Are you sure you want to close?\",\n * closeModalOk: \"Yes, close\",\n * closeModalCancel: \"No, stay\"\n * Test URL: https://capgo.app\n */\n closeModal?: boolean;\n /**\n * CloseModalTitle: title of the confirm when user clicks on close button\n * @since 1.1.0\n * @default \"Close\"\n */\n closeModalTitle?: string;\n /**\n * CloseModalDescription: description of the confirm when user clicks on close button\n * @since 1.1.0\n * @default \"Are you sure you want to close this window?\"\n */\n closeModalDescription?: string;\n /**\n * CloseModalOk: text of the confirm button when user clicks on close button\n * @since 1.1.0\n * @default \"Close\"\n */\n closeModalOk?: string;\n /**\n * CloseModalCancel: text of the cancel button when user clicks on close button\n * @since 1.1.0\n * @default \"Cancel\"\n */\n closeModalCancel?: string;\n /**\n * visibleTitle: if true the website title would be shown else shown empty\n * @since 1.2.5\n * @default true\n */\n visibleTitle?: boolean;\n /**\n * toolbarColor: color of the toolbar in hex format\n * @since 1.2.5\n * @default \"#ffffff\"\n * @example\n * toolbarColor: \"#FF5733\"\n * Test URL: https://capgo.app\n */\n toolbarColor?: string;\n /**\n * toolbarTextColor: color of the buttons and title in the toolbar in hex format\n * When set, it overrides the automatic light/dark mode detection for text color\n * @since 6.10.0\n * @default calculated based on toolbarColor brightness\n * @example\n * toolbarTextColor: \"#FFFFFF\"\n * Test URL: https://capgo.app\n */\n toolbarTextColor?: string;\n /**\n * showArrow: if true an arrow would be shown instead of cross for closing the window\n * @since 1.2.5\n * @default false\n * @example\n * showArrow: true\n * Test URL: https://capgo.app\n */\n showArrow?: boolean;\n /**\n * ignoreUntrustedSSLError: if true, the webview will ignore untrusted SSL errors allowing the user to view the website.\n * @since 6.1.0\n * @default false\n */\n ignoreUntrustedSSLError?: boolean;\n /**\n * preShowScript: if isPresentAfterPageLoad is true and this variable is set the plugin will inject a script before showing the browser.\n * This script will be run in an async context. The plugin will wait for the script to finish (max 10 seconds)\n * @since 6.6.0\n * @example\n * preShowScript: \"await import('https://unpkg.com/darkreader@4.9.89/darkreader.js');\\nDarkReader.enable({ brightness: 100, contrast: 90, sepia: 10 });\"\n * Test URL: https://capgo.app\n */\n preShowScript?: string;\n /**\n * preShowScriptInjectionTime: controls when the preShowScript is injected.\n * - \"documentStart\": injects before any page JavaScript runs (good for polyfills like Firebase)\n * - \"pageLoad\": injects after page load (default, original behavior)\n * @since 7.26.0\n * @default \"pageLoad\"\n * @example\n * preShowScriptInjectionTime: \"documentStart\"\n */\n preShowScriptInjectionTime?: 'documentStart' | 'pageLoad';\n /**\n * proxyRequests is a regex expression. Please see [this pr](https://github.com/Cap-go/capacitor-inappbrowser/pull/222) for more info. (Android only)\n * @since 6.9.0\n */\n proxyRequests?: string;\n /**\n * buttonNearDone allows for a creation of a custom button near the done/close button.\n * The button is only shown when toolbarType is not \"activity\", \"navigation\", or \"blank\".\n *\n * For Android:\n * - iconType must be \"asset\"\n * - icon path should be in the public folder (e.g. \"monkey.svg\")\n * - width and height are optional, defaults to 48dp\n * - button is positioned at the end of toolbar with 8dp margin\n *\n * For iOS:\n * - iconType can be \"sf-symbol\" or \"asset\"\n * - for sf-symbol, icon should be the symbol name\n * - for asset, icon should be the asset name\n * @since 6.7.0\n * @example\n * buttonNearDone: {\n * ios: {\n * iconType: \"sf-symbol\",\n * icon: \"star.fill\"\n * },\n * android: {\n * iconType: \"asset\",\n * icon: \"public/monkey.svg\",\n * width: 24,\n * height: 24\n * }\n * }\n * Test URL: https://capgo.app\n */\n buttonNearDone?: {\n ios: {\n iconType: 'sf-symbol' | 'asset';\n icon: string;\n };\n android: {\n iconType: 'asset' | 'vector';\n icon: string;\n width?: number;\n height?: number;\n };\n };\n /**\n * textZoom: sets the text zoom of the page in percent.\n * Allows users to increase or decrease the text size for better readability.\n * @since 7.6.0\n * @default 100\n * @example\n * textZoom: 120\n * Test URL: https://capgo.app\n */\n textZoom?: number;\n /**\n * preventDeeplink: if true, the deeplink will not be opened, if false the deeplink will be opened when clicked on the link. on IOS each schema need to be added to info.plist file under LSApplicationQueriesSchemes when false to make it work.\n * @since 0.1.0\n * @default false\n * @example\n * preventDeeplink: true\n * Test URL: https://aasa-tester.capgo.app/\n */\n preventDeeplink?: boolean;\n\n /**\n * List of base URLs whose hosts are treated as authorized App Links (Android) and Universal Links (iOS).\n *\n * - On both platforms, only HTTPS links whose host matches any entry in this list\n * will attempt to open via the corresponding native application.\n * - If the app is not installed or the system cannot handle the link, the URL\n * will continue loading inside the in-app browser.\n * - Matching is host-based (case-insensitive), ignoring the \"www.\" prefix.\n * - When `preventDeeplink` is enabled, all external handling is blocked regardless of this list.\n *\n * @example\n * ```ts\n * [\"https://example.com\", \"https://subdomain.app.io\"]\n * ```\n *\n * @since 7.12.0\n * @default []\n */\n authorizedAppLinks?: string[];\n\n /**\n * If true, the webView will not take the full height and will have a 20px margin at the bottom.\n * This creates a safe margin area outside the browser view.\n * @since 7.13.0\n * @default false\n * @example\n * enabledSafeBottomMargin: true\n */\n enabledSafeBottomMargin?: boolean;\n\n /**\n * When true, applies the system status bar inset as the WebView top margin on Android.\n * Keeps the legacy 0px margin by default for apps that handle padding themselves.\n * @default false\n * @example\n * useTopInset: true\n */\n useTopInset?: boolean;\n\n /**\n * enableGooglePaySupport: if true, enables support for Google Pay popups and Payment Request API.\n * This fixes OR_BIBED_15 errors by allowing popup windows and configuring Cross-Origin-Opener-Policy.\n * Only enable this if you need Google Pay functionality as it allows popup windows.\n *\n * When enabled:\n * - Allows popup windows for Google Pay authentication\n * - Sets proper CORS headers for Payment Request API\n * - Enables multiple window support in WebView\n * - Configures secure context for payment processing\n *\n * @since 7.13.0\n * @default false\n * @example\n * enableGooglePaySupport: true\n * Test URL: https://developers.google.com/pay/api/web/guides/tutorial\n */\n enableGooglePaySupport?: boolean;\n\n /**\n * blockedHosts: List of host patterns that should be blocked from loading in the InAppBrowser's internal navigations.\n * Any request inside WebView to a URL with a host matching any of these patterns will be blocked.\n * Supports wildcard patterns like:\n * - \"*.example.com\" to block all subdomains\n * - \"www.example.*\" to block wildcard domain extensions\n *\n * @since 7.17.0\n * @default []\n * @example\n * blockedHosts: [\"*.tracking.com\", \"ads.example.com\"]\n */\n blockedHosts?: string[];\n\n /**\n * Width of the webview in pixels.\n * If not set, webview will be fullscreen width.\n * @default undefined (fullscreen)\n * @example\n * width: 400\n */\n width?: number;\n\n /**\n * Height of the webview in pixels.\n * If not set, webview will be fullscreen height.\n * @default undefined (fullscreen)\n * @example\n * height: 600\n */\n height?: number;\n\n /**\n * X position of the webview in pixels from the left edge.\n * Only effective when width is set.\n * @default 0\n * @example\n * x: 50\n */\n x?: number;\n\n /**\n * Y position of the webview in pixels from the top edge.\n * Only effective when height is set.\n * @default 0\n * @example\n * y: 100\n */\n y?: number;\n\n /**\n * Disables the bounce (overscroll) effect on iOS WebView.\n * When enabled, prevents the rubber band scrolling effect when users scroll beyond content boundaries.\n * This is useful for:\n * - Creating a more native, app-like experience\n * - Preventing accidental overscroll states\n * - Avoiding issues when keyboard opens/closes\n *\n * Note: This option only affects iOS. Android does not have this bounce effect by default.\n *\n * @since 8.0.2\n * @default false\n * @example\n * disableOverscroll: true\n */\n disableOverscroll?: boolean;\n\n /**\n * Opens the webview in hidden mode (not visible to user but fully functional).\n * When hidden, the webview loads and executes JavaScript but is not displayed.\n * All control methods (executeScript, postMessage, setUrl, etc.) work while hidden.\n * Use close() to clean up the hidden webview when done.\n *\n * @since 8.0.7\n * @default false\n * @example\n * hidden: true\n */\n hidden?: boolean;\n\n /**\n * Controls how a hidden webview reports its visibility and size.\n * - AWARE: webview is aware it's hidden (dimensions may be zero).\n * - FAKE_VISIBLE: webview is hidden but reports fullscreen dimensions (uses alpha=0 to remain invisible).\n *\n * @default InvisibilityMode.AWARE\n * @example\n * invisibilityMode: InvisibilityMode.FAKE_VISIBLE\n */\n invisibilityMode?: InvisibilityMode;\n}\n\nexport interface DimensionOptions {\n /**\n * Width of the webview in pixels\n */\n width?: number;\n /**\n * Height of the webview in pixels\n */\n height?: number;\n /**\n * X position from the left edge in pixels\n */\n x?: number;\n /**\n * Y position from the top edge in pixels\n */\n y?: number;\n}\n\nexport interface InAppBrowserPlugin {\n /**\n * Navigates back in the WebView's history if possible\n *\n * @since 7.21.0\n * @returns Promise that resolves with true if navigation was possible, false otherwise\n */\n goBack(): Promise<{ canGoBack: boolean }>;\n\n /**\n * Open url in a new window fullscreen, on android it use chrome custom tabs, on ios it use SFSafariViewController\n *\n * @since 0.1.0\n */\n open(options: OpenOptions): Promise<any>;\n\n /**\n * Clear cookies of url\n *\n * @since 0.5.0\n */\n clearCookies(options: ClearCookieOptions): Promise<any>;\n /**\n * Clear all cookies\n *\n * @since 6.5.0\n */\n clearAllCookies(): Promise<any>;\n\n /**\n * Clear cache\n *\n * @since 6.5.0\n */\n clearCache(): Promise<any>;\n\n /**\n * Get cookies for a specific URL.\n * @param options The options, including the URL to get cookies for.\n * @returns A promise that resolves with the cookies.\n */\n getCookies(options: GetCookieOptions): Promise<Record<string, string>>;\n /**\n * Close the webview.\n */\n close(options?: CloseWebviewOptions): Promise<any>;\n /**\n * Hide the webview without closing it.\n * Use show() to bring it back.\n *\n * @since 8.0.8\n */\n hide(): Promise<void>;\n /**\n * Show a previously hidden webview.\n *\n * @since 8.0.8\n */\n show(): Promise<void>;\n /**\n * Open url in a new webview with toolbars, and enhanced capabilities, like camera access, file access, listen events, inject javascript, bi directional communication, etc.\n *\n * JavaScript Interface:\n * When you open a webview with this method, a JavaScript interface is automatically injected that provides:\n * - `window.mobileApp.close()`: Closes the webview from JavaScript\n * - `window.mobileApp.postMessage({detail: {message: \"myMessage\"}})`: Sends a message from the webview to the app, detail object is the data you want to send to the webview\n *\n * @since 0.1.0\n */\n openWebView(options: OpenWebViewOptions): Promise<any>;\n /**\n * Injects JavaScript code into the InAppBrowser window.\n */\n executeScript({ code }: { code: string }): Promise<void>;\n /**\n * Sends an event to the webview(inappbrowser). you can listen to this event in the inappbrowser JS with window.addEventListener(\"messageFromNative\", listenerFunc: (event: Record<string, any>) => void)\n * detail is the data you want to send to the webview, it's a requirement of Capacitor we cannot send direct objects\n * Your object has to be serializable to JSON, so no functions or other non-JSON-serializable types are allowed.\n */\n postMessage(options: { detail: Record<string, any> }): Promise<void>;\n /**\n * Sets the URL of the webview.\n */\n setUrl(options: { url: string }): Promise<any>;\n /**\n * Listen for url change, only for openWebView\n *\n * @since 0.0.1\n */\n addListener(eventName: 'urlChangeEvent', listenerFunc: UrlChangeListener): Promise<PluginListenerHandle>;\n\n addListener(eventName: 'buttonNearDoneClick', listenerFunc: ButtonNearListener): Promise<PluginListenerHandle>;\n\n /**\n * Listen for close click only for openWebView\n *\n * @since 0.4.0\n */\n addListener(eventName: 'closeEvent', listenerFunc: UrlChangeListener): Promise<PluginListenerHandle>;\n /**\n * Will be triggered when user clicks on confirm button when disclaimer is required,\n * works with openWebView shareDisclaimer and closeModal\n *\n * @since 0.0.1\n */\n addListener(eventName: 'confirmBtnClicked', listenerFunc: ConfirmBtnListener): Promise<PluginListenerHandle>;\n /**\n * Will be triggered when event is sent from webview(inappbrowser), to send an event to the main app use window.mobileApp.postMessage({ \"detail\": { \"message\": \"myMessage\" } })\n * detail is the data you want to send to the main app, it's a requirement of Capacitor we cannot send direct objects\n * Your object has to be serializable to JSON, no functions or other non-JSON-serializable types are allowed.\n *\n * This method is inject at runtime in the webview\n */\n addListener(\n eventName: 'messageFromWebview',\n listenerFunc: (event: { detail: Record<string, any> }) => void,\n ): Promise<PluginListenerHandle>;\n\n /**\n * Will be triggered when page is loaded\n */\n addListener(eventName: 'browserPageLoaded', listenerFunc: () => void): Promise<PluginListenerHandle>;\n\n /**\n * Will be triggered when page load error\n */\n addListener(eventName: 'pageLoadError', listenerFunc: () => void): Promise<PluginListenerHandle>;\n /**\n * Remove all listeners for this plugin.\n *\n * @since 1.0.0\n */\n removeAllListeners(): Promise<void>;\n\n /**\n * Reload the current web page.\n *\n * @since 1.0.0\n */\n reload(): Promise<any>;\n\n /**\n * Update the dimensions of the webview.\n * Allows changing the size and position of the webview at runtime.\n *\n * @param options Dimension options (width, height, x, y)\n * @returns Promise that resolves when dimensions are updated\n */\n updateDimensions(options: DimensionOptions): Promise<void>;\n}\n\n/**\n * JavaScript APIs available in the InAppBrowser WebView.\n *\n * These APIs are automatically injected into all webpages loaded in the InAppBrowser WebView.\n *\n * @example\n * // Closing the webview from JavaScript\n * window.mobileApp.close();\n *\n * // Sending a message from webview to the native app\n * window.mobileApp.postMessage({ key: \"value\" });\n *\n * @since 6.10.0\n */\nexport interface InAppBrowserWebViewAPIs {\n /**\n * mobileApp - Global object injected into the WebView providing communication with the native app\n */\n mobileApp: {\n /**\n * Close the WebView from JavaScript\n *\n * @example\n * // Add a button to close the webview\n * const closeButton = document.createElement(\"button\");\n * closeButton.textContent = \"Close WebView\";\n * closeButton.addEventListener(\"click\", () => {\n * window.mobileApp.close();\n * });\n * document.body.appendChild(closeButton);\n *\n * @since 6.10.0\n */\n close(): void;\n\n /**\n * Send a message from the WebView to the native app\n * The native app can listen for these messages with the \"messageFromWebview\" event\n *\n * @param message Object to send to the native app\n * @example\n * // Send data to native app\n * window.mobileApp.postMessage({\n * action: \"dataSubmitted\",\n * data: { username: \"test\", email: \"test@example.com\" }\n * });\n *\n * @since 6.10.0\n */\n postMessage(message: Record<string, any>): void;\n\n /**\n * Hide the WebView from JavaScript (requires allowWebViewJsVisibilityControl: true in CapacitorConfig)\n *\n * @since 8.0.8\n */\n hide(): void;\n\n /**\n * Show the WebView from JavaScript (requires allowWebViewJsVisibilityControl: true in CapacitorConfig)\n *\n * @since 8.0.8\n */\n show(): void;\n };\n\n /**\n * Get the native Capacitor plugin version\n *\n * @returns {Promise<{ id: string }>} an Promise with version for this device\n * @throws An error if the something went wrong\n */\n getPluginVersion(): Promise<{ version: string }>;\n}\n"]}
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AA+BA,MAAM,CAAN,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,kCAAe,CAAA;IACf,kCAAe,CAAA;AACjB,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B;AACD,MAAM,CAAN,IAAY,WAqBX;AArBD,WAAY,WAAW;IACrB;;;OAGG;IACH,oCAAqB,CAAA;IACrB;;;OAGG;IACH,kCAAmB,CAAA;IACnB;;;OAGG;IACH,wCAAyB,CAAA;IACzB;;;OAGG;IACH,8BAAe,CAAA;AACjB,CAAC,EArBW,WAAW,KAAX,WAAW,QAqBtB;AAED,MAAM,CAAN,IAAY,gBASX;AATD,WAAY,gBAAgB;IAC1B;;OAEG;IACH,mCAAe,CAAA;IACf;;OAEG;IACH,iDAA6B,CAAA;AAC/B,CAAC,EATW,gBAAgB,KAAhB,gBAAgB,QAS3B","sourcesContent":["import type { PluginListenerHandle } from '@capacitor/core';\n\nexport interface UrlEvent {\n /**\n * Webview instance id.\n */\n id?: string;\n /**\n * Emit when the url changes\n *\n * @since 0.0.1\n */\n url: string;\n}\nexport interface BtnEvent {\n /**\n * Webview instance id.\n */\n id?: string;\n /**\n * Emit when a button is clicked.\n *\n * @since 0.0.1\n */\n url: string;\n}\n\nexport type UrlChangeListener = (state: UrlEvent) => void;\nexport type ConfirmBtnListener = (state: BtnEvent) => void;\nexport type ButtonNearListener = (state: object) => void;\n\nexport enum BackgroundColor {\n WHITE = 'white',\n BLACK = 'black',\n}\nexport enum ToolBarType {\n /**\n * Shows a simple toolbar with just a close button and share button\n * @since 0.1.0\n */\n ACTIVITY = 'activity',\n /**\n * Shows a simple toolbar with just a close button\n * @since 7.6.8\n */\n COMPACT = 'compact',\n /**\n * Shows a full navigation toolbar with back/forward buttons\n * @since 0.1.0\n */\n NAVIGATION = 'navigation',\n /**\n * Shows no toolbar\n * @since 0.1.0\n */\n BLANK = 'blank',\n}\n\nexport enum InvisibilityMode {\n /**\n * WebView is aware it is hidden (dimensions may be zero).\n */\n AWARE = 'AWARE',\n /**\n * WebView is hidden but reports fullscreen dimensions (uses alpha=0 to remain invisible).\n */\n FAKE_VISIBLE = 'FAKE_VISIBLE',\n}\n\nexport interface Headers {\n [key: string]: string;\n}\n\nexport interface GetCookieOptions {\n url: string;\n includeHttpOnly?: boolean;\n}\n\nexport interface ClearCookieOptions {\n /**\n * Target webview id.\n * When omitted, applies to all open webviews.\n */\n id?: string;\n url: string;\n}\n\nexport interface Credentials {\n username: string;\n password: string;\n}\n\nexport interface OpenOptions {\n /**\n * Target URL to load.\n * @since 0.1.0\n */\n url: string;\n /**\n * if true, the browser will be presented after the page is loaded, if false, the browser will be presented immediately.\n * @since 0.1.0\n */\n isPresentAfterPageLoad?: boolean;\n /**\n * if true the deeplink will not be opened, if false the deeplink will be opened when clicked on the link\n * @since 0.1.0\n */\n preventDeeplink?: boolean;\n}\n\nexport interface DisclaimerOptions {\n /**\n * Title of the disclaimer dialog\n * @default \"Title\"\n */\n title: string;\n /**\n * Message shown in the disclaimer dialog\n * @default \"Message\"\n */\n message: string;\n /**\n * Text for the confirm button\n * @default \"Confirm\"\n */\n confirmBtn: string;\n /**\n * Text for the cancel button\n * @default \"Cancel\"\n */\n cancelBtn: string;\n}\n\nexport interface CloseWebviewOptions {\n /**\n * Target webview id to close. If omitted, closes the active webview.\n */\n id?: string;\n /**\n * Whether the webview closing is animated or not, ios only\n * @default true\n */\n isAnimated?: boolean;\n}\n\nexport interface OpenWebViewOptions {\n /**\n * Target URL to load.\n * @since 0.1.0\n * @example \"https://capgo.app\"\n */\n url: string;\n /**\n * Headers to send with the request.\n * @since 0.1.0\n * @example\n * headers: {\n * \"Custom-Header\": \"test-value\",\n * \"Authorization\": \"Bearer test-token\"\n * }\n * Test URL: https://www.whatismybrowser.com/detect/what-http-headers-is-my-browser-sending/\n */\n headers?: Headers;\n /**\n * Credentials to send with the request and all subsequent requests for the same host.\n * @since 6.1.0\n * @example\n * credentials: {\n * username: \"test-user\",\n * password: \"test-pass\"\n * }\n * Test URL: https://www.whatismybrowser.com/detect/what-http-headers-is-my-browser-sending/\n */\n credentials?: Credentials;\n /**\n * materialPicker: if true, uses Material Design theme for date and time pickers on Android.\n * This improves the appearance of HTML date inputs to use modern Material Design UI instead of the old style pickers.\n * @since 7.4.1\n * @default false\n * @example\n * materialPicker: true\n * Test URL: https://show-picker.glitch.me/demo.html\n */\n materialPicker?: boolean;\n /**\n * JavaScript Interface:\n * The webview automatically injects a JavaScript interface providing:\n * - `window.mobileApp.close()`: Closes the webview from JavaScript\n * - `window.mobileApp.postMessage(obj)`: Sends a message to the app (listen via \"messageFromWebview\" event)\n * - `window.mobileApp.hide()` / `window.mobileApp.show()` when allowWebViewJsVisibilityControl is true in CapacitorConfig\n *\n * @example\n * // In your webpage loaded in the webview:\n * document.getElementById(\"closeBtn\").addEventListener(\"click\", () => {\n * window.mobileApp.close();\n * });\n *\n * // Send data to the app\n * window.mobileApp.postMessage({ action: \"login\", data: { user: \"test\" }});\n *\n * @since 6.10.0\n */\n jsInterface?: never; // This property doesn't exist, it's just for documentation\n /**\n * Share options for the webview. When provided, shows a disclaimer dialog before sharing content.\n * This is useful for:\n * - Warning users about sharing sensitive information\n * - Getting user consent before sharing\n * - Explaining what will be shared\n * - Complying with privacy regulations\n *\n * Note: shareSubject is required when using shareDisclaimer\n * @since 0.1.0\n * @example\n * shareDisclaimer: {\n * title: \"Disclaimer\",\n * message: \"This is a test disclaimer\",\n * confirmBtn: \"Accept\",\n * cancelBtn: \"Decline\"\n * }\n * Test URL: https://capgo.app\n */\n shareDisclaimer?: DisclaimerOptions;\n /**\n * Toolbar type determines the appearance and behavior of the browser's toolbar\n * - \"activity\": Shows a simple toolbar with just a close button and share button\n * - \"navigation\": Shows a full navigation toolbar with back/forward buttons\n * - \"blank\": Shows no toolbar\n * - \"\": Default toolbar with close button\n * @since 0.1.0\n * @default ToolBarType.DEFAULT\n * @example\n * toolbarType: ToolBarType.ACTIVITY,\n * title: \"Activity Toolbar Test\"\n * Test URL: https://capgo.app\n */\n toolbarType?: ToolBarType;\n /**\n * Subject text for sharing. Required when using shareDisclaimer.\n * This text will be used as the subject line when sharing content.\n * @since 0.1.0\n * @example \"Share this page\"\n */\n shareSubject?: string;\n /**\n * Title of the browser\n * @since 0.1.0\n * @default \"New Window\"\n * @example \"Camera Test\"\n */\n title?: string;\n /**\n * Background color of the browser\n * @since 0.1.0\n * @default BackgroundColor.BLACK\n */\n backgroundColor?: BackgroundColor;\n /**\n * If true, enables native navigation gestures within the webview.\n * - Android: Native back button navigates within webview history\n * - iOS: Enables swipe left/right gestures for back/forward navigation\n * @default false (Android), true (iOS - enabled by default)\n * @example\n * activeNativeNavigationForWebview: true,\n * disableGoBackOnNativeApplication: true\n * Test URL: https://capgo.app\n */\n activeNativeNavigationForWebview?: boolean;\n /**\n * Disable the possibility to go back on native application,\n * useful to force user to stay on the webview, Android only\n * @default false\n * @example\n * disableGoBackOnNativeApplication: true\n * Test URL: https://capgo.app\n */\n disableGoBackOnNativeApplication?: boolean;\n /**\n * Open url in a new window fullscreen\n * isPresentAfterPageLoad: if true, the browser will be presented after the page is loaded, if false, the browser will be presented immediately.\n * @since 0.1.0\n * @default false\n * @example\n * isPresentAfterPageLoad: true,\n * preShowScript: \"await import('https://unpkg.com/darkreader@4.9.89/darkreader.js');\\nDarkReader.enable({ brightness: 100, contrast: 90, sepia: 10 });\"\n * Test URL: https://capgo.app\n */\n isPresentAfterPageLoad?: boolean;\n /**\n * Whether the website in the webview is inspectable or not, ios only\n * @default false\n */\n isInspectable?: boolean;\n /**\n * Whether the webview opening is animated or not, ios only\n * @default true\n */\n isAnimated?: boolean;\n /**\n * Shows a reload button that reloads the web page\n * @since 1.0.15\n * @default false\n * @example\n * showReloadButton: true\n * Test URL: https://capgo.app\n */\n showReloadButton?: boolean;\n /**\n * CloseModal: if true a confirm will be displayed when user clicks on close button, if false the browser will be closed immediately.\n * @since 1.1.0\n * @default false\n * @example\n * closeModal: true,\n * closeModalTitle: \"Close Window\",\n * closeModalDescription: \"Are you sure you want to close?\",\n * closeModalOk: \"Yes, close\",\n * closeModalCancel: \"No, stay\"\n * Test URL: https://capgo.app\n */\n closeModal?: boolean;\n /**\n * CloseModalTitle: title of the confirm when user clicks on close button\n * @since 1.1.0\n * @default \"Close\"\n */\n closeModalTitle?: string;\n /**\n * CloseModalDescription: description of the confirm when user clicks on close button\n * @since 1.1.0\n * @default \"Are you sure you want to close this window?\"\n */\n closeModalDescription?: string;\n /**\n * CloseModalOk: text of the confirm button when user clicks on close button\n * @since 1.1.0\n * @default \"Close\"\n */\n closeModalOk?: string;\n /**\n * CloseModalCancel: text of the cancel button when user clicks on close button\n * @since 1.1.0\n * @default \"Cancel\"\n */\n closeModalCancel?: string;\n /**\n * visibleTitle: if true the website title would be shown else shown empty\n * @since 1.2.5\n * @default true\n */\n visibleTitle?: boolean;\n /**\n * toolbarColor: color of the toolbar in hex format\n * @since 1.2.5\n * @default \"#ffffff\"\n * @example\n * toolbarColor: \"#FF5733\"\n * Test URL: https://capgo.app\n */\n toolbarColor?: string;\n /**\n * toolbarTextColor: color of the buttons and title in the toolbar in hex format\n * When set, it overrides the automatic light/dark mode detection for text color\n * @since 6.10.0\n * @default calculated based on toolbarColor brightness\n * @example\n * toolbarTextColor: \"#FFFFFF\"\n * Test URL: https://capgo.app\n */\n toolbarTextColor?: string;\n /**\n * showArrow: if true an arrow would be shown instead of cross for closing the window\n * @since 1.2.5\n * @default false\n * @example\n * showArrow: true\n * Test URL: https://capgo.app\n */\n showArrow?: boolean;\n /**\n * ignoreUntrustedSSLError: if true, the webview will ignore untrusted SSL errors allowing the user to view the website.\n * @since 6.1.0\n * @default false\n */\n ignoreUntrustedSSLError?: boolean;\n /**\n * preShowScript: if isPresentAfterPageLoad is true and this variable is set the plugin will inject a script before showing the browser.\n * This script will be run in an async context. The plugin will wait for the script to finish (max 10 seconds)\n * @since 6.6.0\n * @example\n * preShowScript: \"await import('https://unpkg.com/darkreader@4.9.89/darkreader.js');\\nDarkReader.enable({ brightness: 100, contrast: 90, sepia: 10 });\"\n * Test URL: https://capgo.app\n */\n preShowScript?: string;\n /**\n * preShowScriptInjectionTime: controls when the preShowScript is injected.\n * - \"documentStart\": injects before any page JavaScript runs (good for polyfills like Firebase)\n * - \"pageLoad\": injects after page load (default, original behavior)\n * @since 7.26.0\n * @default \"pageLoad\"\n * @example\n * preShowScriptInjectionTime: \"documentStart\"\n */\n preShowScriptInjectionTime?: 'documentStart' | 'pageLoad';\n /**\n * proxyRequests is a regex expression. Please see [this pr](https://github.com/Cap-go/capacitor-inappbrowser/pull/222) for more info. (Android only)\n * @since 6.9.0\n */\n proxyRequests?: string;\n /**\n * buttonNearDone allows for a creation of a custom button near the done/close button.\n * The button is only shown when toolbarType is not \"activity\", \"navigation\", or \"blank\".\n *\n * For Android:\n * - iconType must be \"asset\"\n * - icon path should be in the public folder (e.g. \"monkey.svg\")\n * - width and height are optional, defaults to 48dp\n * - button is positioned at the end of toolbar with 8dp margin\n *\n * For iOS:\n * - iconType can be \"sf-symbol\" or \"asset\"\n * - for sf-symbol, icon should be the symbol name\n * - for asset, icon should be the asset name\n * @since 6.7.0\n * @example\n * buttonNearDone: {\n * ios: {\n * iconType: \"sf-symbol\",\n * icon: \"star.fill\"\n * },\n * android: {\n * iconType: \"asset\",\n * icon: \"public/monkey.svg\",\n * width: 24,\n * height: 24\n * }\n * }\n * Test URL: https://capgo.app\n */\n buttonNearDone?: {\n ios: {\n iconType: 'sf-symbol' | 'asset';\n icon: string;\n };\n android: {\n iconType: 'asset' | 'vector';\n icon: string;\n width?: number;\n height?: number;\n };\n };\n /**\n * textZoom: sets the text zoom of the page in percent.\n * Allows users to increase or decrease the text size for better readability.\n * @since 7.6.0\n * @default 100\n * @example\n * textZoom: 120\n * Test URL: https://capgo.app\n */\n textZoom?: number;\n /**\n * preventDeeplink: if true, the deeplink will not be opened, if false the deeplink will be opened when clicked on the link. on IOS each schema need to be added to info.plist file under LSApplicationQueriesSchemes when false to make it work.\n * @since 0.1.0\n * @default false\n * @example\n * preventDeeplink: true\n * Test URL: https://aasa-tester.capgo.app/\n */\n preventDeeplink?: boolean;\n\n /**\n * List of base URLs whose hosts are treated as authorized App Links (Android) and Universal Links (iOS).\n *\n * - On both platforms, only HTTPS links whose host matches any entry in this list\n * will attempt to open via the corresponding native application.\n * - If the app is not installed or the system cannot handle the link, the URL\n * will continue loading inside the in-app browser.\n * - Matching is host-based (case-insensitive), ignoring the \"www.\" prefix.\n * - When `preventDeeplink` is enabled, all external handling is blocked regardless of this list.\n *\n * @example\n * ```ts\n * [\"https://example.com\", \"https://subdomain.app.io\"]\n * ```\n *\n * @since 7.12.0\n * @default []\n */\n authorizedAppLinks?: string[];\n\n /**\n * If true, the webView will not take the full height and will have a 20px margin at the bottom.\n * This creates a safe margin area outside the browser view.\n * @since 7.13.0\n * @default false\n * @example\n * enabledSafeBottomMargin: true\n */\n enabledSafeBottomMargin?: boolean;\n\n /**\n * When true, applies the system status bar inset as the WebView top margin on Android.\n * Keeps the legacy 0px margin by default for apps that handle padding themselves.\n * @default false\n * @example\n * useTopInset: true\n */\n useTopInset?: boolean;\n\n /**\n * enableGooglePaySupport: if true, enables support for Google Pay popups and Payment Request API.\n * This fixes OR_BIBED_15 errors by allowing popup windows and configuring Cross-Origin-Opener-Policy.\n * Only enable this if you need Google Pay functionality as it allows popup windows.\n *\n * When enabled:\n * - Allows popup windows for Google Pay authentication\n * - Sets proper CORS headers for Payment Request API\n * - Enables multiple window support in WebView\n * - Configures secure context for payment processing\n *\n * @since 7.13.0\n * @default false\n * @example\n * enableGooglePaySupport: true\n * Test URL: https://developers.google.com/pay/api/web/guides/tutorial\n */\n enableGooglePaySupport?: boolean;\n\n /**\n * blockedHosts: List of host patterns that should be blocked from loading in the InAppBrowser's internal navigations.\n * Any request inside WebView to a URL with a host matching any of these patterns will be blocked.\n * Supports wildcard patterns like:\n * - \"*.example.com\" to block all subdomains\n * - \"www.example.*\" to block wildcard domain extensions\n *\n * @since 7.17.0\n * @default []\n * @example\n * blockedHosts: [\"*.tracking.com\", \"ads.example.com\"]\n */\n blockedHosts?: string[];\n\n /**\n * Width of the webview in pixels.\n * If not set, webview will be fullscreen width.\n * @default undefined (fullscreen)\n * @example\n * width: 400\n */\n width?: number;\n\n /**\n * Height of the webview in pixels.\n * If not set, webview will be fullscreen height.\n * @default undefined (fullscreen)\n * @example\n * height: 600\n */\n height?: number;\n\n /**\n * X position of the webview in pixels from the left edge.\n * Only effective when width is set.\n * @default 0\n * @example\n * x: 50\n */\n x?: number;\n\n /**\n * Y position of the webview in pixels from the top edge.\n * Only effective when height is set.\n * @default 0\n * @example\n * y: 100\n */\n y?: number;\n\n /**\n * Disables the bounce (overscroll) effect on iOS WebView.\n * When enabled, prevents the rubber band scrolling effect when users scroll beyond content boundaries.\n * This is useful for:\n * - Creating a more native, app-like experience\n * - Preventing accidental overscroll states\n * - Avoiding issues when keyboard opens/closes\n *\n * Note: This option only affects iOS. Android does not have this bounce effect by default.\n *\n * @since 8.0.2\n * @default false\n * @example\n * disableOverscroll: true\n */\n disableOverscroll?: boolean;\n\n /**\n * Opens the webview in hidden mode (not visible to user but fully functional).\n * When hidden, the webview loads and executes JavaScript but is not displayed.\n * All control methods (executeScript, postMessage, setUrl, etc.) work while hidden.\n * Use close() to clean up the hidden webview when done.\n *\n * @since 8.0.7\n * @default false\n * @example\n * hidden: true\n */\n hidden?: boolean;\n\n /**\n * Controls how a hidden webview reports its visibility and size.\n * - AWARE: webview is aware it's hidden (dimensions may be zero).\n * - FAKE_VISIBLE: webview is hidden but reports fullscreen dimensions (uses alpha=0 to remain invisible).\n *\n * @default InvisibilityMode.AWARE\n * @example\n * invisibilityMode: InvisibilityMode.FAKE_VISIBLE\n */\n invisibilityMode?: InvisibilityMode;\n}\n\nexport interface DimensionOptions {\n /**\n * Width of the webview in pixels\n */\n width?: number;\n /**\n * Height of the webview in pixels\n */\n height?: number;\n /**\n * X position from the left edge in pixels\n */\n x?: number;\n /**\n * Y position from the top edge in pixels\n */\n y?: number;\n}\n\nexport interface InAppBrowserPlugin {\n /**\n * Navigates back in the WebView's history if possible\n *\n * @since 7.21.0\n * @returns Promise that resolves with true if navigation was possible, false otherwise\n */\n goBack(options?: { id?: string }): Promise<{ canGoBack: boolean }>;\n\n /**\n * Open url in a new window fullscreen, on android it use chrome custom tabs, on ios it use SFSafariViewController\n *\n * @since 0.1.0\n */\n open(options: OpenOptions): Promise<any>;\n\n /**\n * Clear cookies of url\n * When `id` is omitted, applies to all open webviews.\n *\n * @since 0.5.0\n */\n clearCookies(options: ClearCookieOptions): Promise<any>;\n /**\n * Clear all cookies\n * When `id` is omitted, applies to all open webviews.\n *\n * @since 6.5.0\n */\n clearAllCookies(options?: { id?: string }): Promise<any>;\n\n /**\n * Clear cache\n * When `id` is omitted, applies to all open webviews.\n *\n * @since 6.5.0\n */\n clearCache(options?: { id?: string }): Promise<any>;\n\n /**\n * Get cookies for a specific URL.\n * @param options The options, including the URL to get cookies for.\n * @returns A promise that resolves with the cookies.\n */\n getCookies(options: GetCookieOptions): Promise<Record<string, string>>;\n /**\n * Close the webview.\n * When `id` is omitted, closes the active webview.\n */\n close(options?: CloseWebviewOptions): Promise<any>;\n /**\n * Hide the webview without closing it.\n * Use show() to bring it back.\n *\n * @since 8.0.8\n */\n hide(): Promise<void>;\n /**\n * Show a previously hidden webview.\n *\n * @since 8.0.8\n */\n show(): Promise<void>;\n /**\n * Open url in a new webview with toolbars, and enhanced capabilities, like camera access, file access, listen events, inject javascript, bi directional communication, etc.\n *\n * JavaScript Interface:\n * When you open a webview with this method, a JavaScript interface is automatically injected that provides:\n * - `window.mobileApp.close()`: Closes the webview from JavaScript\n * - `window.mobileApp.postMessage({detail: {message: \"myMessage\"}})`: Sends a message from the webview to the app, detail object is the data you want to send to the webview\n *\n * @returns Promise that resolves with the created webview id.\n * @since 0.1.0\n */\n openWebView(options: OpenWebViewOptions): Promise<{ id: string }>;\n /**\n * Injects JavaScript code into the InAppBrowser window.\n * When `id` is omitted, executes in all open webviews.\n */\n executeScript(options: { code: string; id?: string }): Promise<void>;\n /**\n * Sends an event to the webview(inappbrowser). you can listen to this event in the inappbrowser JS with window.addEventListener(\"messageFromNative\", listenerFunc: (event: Record<string, any>) => void)\n * detail is the data you want to send to the webview, it's a requirement of Capacitor we cannot send direct objects\n * Your object has to be serializable to JSON, so no functions or other non-JSON-serializable types are allowed.\n * When `id` is omitted, broadcasts to all open webviews.\n */\n postMessage(options: { detail: Record<string, any>; id?: string }): Promise<void>;\n /**\n * Sets the URL of the webview.\n * When `id` is omitted, targets the active webview.\n */\n setUrl(options: { url: string; id?: string }): Promise<any>;\n /**\n * Listen for url change, only for openWebView\n *\n * @since 0.0.1\n */\n addListener(eventName: 'urlChangeEvent', listenerFunc: UrlChangeListener): Promise<PluginListenerHandle>;\n\n addListener(eventName: 'buttonNearDoneClick', listenerFunc: ButtonNearListener): Promise<PluginListenerHandle>;\n\n /**\n * Listen for close click only for openWebView\n *\n * @since 0.4.0\n */\n addListener(eventName: 'closeEvent', listenerFunc: UrlChangeListener): Promise<PluginListenerHandle>;\n /**\n * Will be triggered when user clicks on confirm button when disclaimer is required,\n * works with openWebView shareDisclaimer and closeModal\n *\n * @since 0.0.1\n */\n addListener(eventName: 'confirmBtnClicked', listenerFunc: ConfirmBtnListener): Promise<PluginListenerHandle>;\n /**\n * Will be triggered when event is sent from webview(inappbrowser), to send an event to the main app use window.mobileApp.postMessage({ \"detail\": { \"message\": \"myMessage\" } })\n * detail is the data you want to send to the main app, it's a requirement of Capacitor we cannot send direct objects\n * Your object has to be serializable to JSON, no functions or other non-JSON-serializable types are allowed.\n *\n * This method is inject at runtime in the webview\n */\n addListener(\n eventName: 'messageFromWebview',\n listenerFunc: (event: { id?: string; detail?: Record<string, any>; rawMessage?: string }) => void,\n ): Promise<PluginListenerHandle>;\n\n /**\n * Will be triggered when page is loaded\n */\n addListener(\n eventName: 'browserPageLoaded',\n listenerFunc: (event: { id?: string }) => void,\n ): Promise<PluginListenerHandle>;\n\n /**\n * Will be triggered when page load error\n */\n addListener(\n eventName: 'pageLoadError',\n listenerFunc: (event: { id?: string }) => void,\n ): Promise<PluginListenerHandle>;\n /**\n * Remove all listeners for this plugin.\n *\n * @since 1.0.0\n */\n removeAllListeners(): Promise<void>;\n\n /**\n * Reload the current web page.\n *\n * @since 1.0.0\n */\n reload(options?: { id?: string }): Promise<any>;\n\n /**\n * Update the dimensions of the webview.\n * Allows changing the size and position of the webview at runtime.\n * When `id` is omitted, targets the active webview.\n *\n * @param options Dimension options (width, height, x, y)\n * @returns Promise that resolves when dimensions are updated\n */\n updateDimensions(options: DimensionOptions & { id?: string }): Promise<void>;\n}\n\n/**\n * JavaScript APIs available in the InAppBrowser WebView.\n *\n * These APIs are automatically injected into all webpages loaded in the InAppBrowser WebView.\n *\n * @example\n * // Closing the webview from JavaScript\n * window.mobileApp.close();\n *\n * // Sending a message from webview to the native app\n * window.mobileApp.postMessage({ key: \"value\" });\n *\n * @since 6.10.0\n */\nexport interface InAppBrowserWebViewAPIs {\n /**\n * mobileApp - Global object injected into the WebView providing communication with the native app\n */\n mobileApp: {\n /**\n * Close the WebView from JavaScript\n *\n * @example\n * // Add a button to close the webview\n * const closeButton = document.createElement(\"button\");\n * closeButton.textContent = \"Close WebView\";\n * closeButton.addEventListener(\"click\", () => {\n * window.mobileApp.close();\n * });\n * document.body.appendChild(closeButton);\n *\n * @since 6.10.0\n */\n close(): void;\n\n /**\n * Send a message from the WebView to the native app\n * The native app can listen for these messages with the \"messageFromWebview\" event\n *\n * @param message Object to send to the native app\n * @example\n * // Send data to native app\n * window.mobileApp.postMessage({\n * action: \"dataSubmitted\",\n * data: { username: \"test\", email: \"test@example.com\" }\n * });\n *\n * @since 6.10.0\n */\n postMessage(message: Record<string, any>): void;\n\n /**\n * Hide the WebView from JavaScript (requires allowWebViewJsVisibilityControl: true in CapacitorConfig)\n *\n * @since 8.0.8\n */\n hide(): void;\n\n /**\n * Show the WebView from JavaScript (requires allowWebViewJsVisibilityControl: true in CapacitorConfig)\n *\n * @since 8.0.8\n */\n show(): void;\n };\n\n /**\n * Get the native Capacitor plugin version\n *\n * @returns {Promise<{ id: string }>} an Promise with version for this device\n * @throws An error if the something went wrong\n */\n getPluginVersion(): Promise<{ version: string }>;\n}\n"]}