@calvingoh-hexa/capacitor-inappbrowser 6.9.36

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.
Files changed (55) hide show
  1. package/CapgoInappbrowser.podspec +17 -0
  2. package/LICENSE +21 -0
  3. package/README.md +690 -0
  4. package/android/build.gradle +64 -0
  5. package/android/src/main/AndroidManifest.xml +12 -0
  6. package/android/src/main/java/ee/forgr/capacitor_inappbrowser/InAppBrowserPlugin.java +741 -0
  7. package/android/src/main/java/ee/forgr/capacitor_inappbrowser/Options.java +340 -0
  8. package/android/src/main/java/ee/forgr/capacitor_inappbrowser/WebViewCallbacks.java +15 -0
  9. package/android/src/main/java/ee/forgr/capacitor_inappbrowser/WebViewDialog.java +1177 -0
  10. package/android/src/main/res/.gitkeep +0 -0
  11. package/android/src/main/res/drawable/arrow_back_disabled.xml +9 -0
  12. package/android/src/main/res/drawable/arrow_back_enabled.xml +9 -0
  13. package/android/src/main/res/drawable/arrow_forward_disabled.xml +9 -0
  14. package/android/src/main/res/drawable/arrow_forward_enabled.xml +9 -0
  15. package/android/src/main/res/drawable/ic_clear_24px.xml +9 -0
  16. package/android/src/main/res/drawable/ic_refresh.xml +9 -0
  17. package/android/src/main/res/layout/activity_browser.xml +22 -0
  18. package/android/src/main/res/layout/bridge_layout_main.xml +15 -0
  19. package/android/src/main/res/layout/content_browser.xml +16 -0
  20. package/android/src/main/res/layout/tool_bar.xml +72 -0
  21. package/android/src/main/res/values/browser_theme.xml +3 -0
  22. package/android/src/main/res/values/colors.xml +5 -0
  23. package/android/src/main/res/values/dimens.xml +3 -0
  24. package/android/src/main/res/values/strings.xml +11 -0
  25. package/android/src/main/res/values/styles.xml +4 -0
  26. package/dist/docs.json +1865 -0
  27. package/dist/esm/definitions.d.ts +361 -0
  28. package/dist/esm/definitions.js +13 -0
  29. package/dist/esm/definitions.js.map +1 -0
  30. package/dist/esm/index.d.ts +4 -0
  31. package/dist/esm/index.js +7 -0
  32. package/dist/esm/index.js.map +1 -0
  33. package/dist/esm/web.d.ts +19 -0
  34. package/dist/esm/web.js +48 -0
  35. package/dist/esm/web.js.map +1 -0
  36. package/dist/plugin.cjs.js +75 -0
  37. package/dist/plugin.cjs.js.map +1 -0
  38. package/dist/plugin.js +78 -0
  39. package/dist/plugin.js.map +1 -0
  40. package/ios/Plugin/Assets.xcassets/Back.imageset/Back.png +0 -0
  41. package/ios/Plugin/Assets.xcassets/Back.imageset/Back@2x.png +0 -0
  42. package/ios/Plugin/Assets.xcassets/Back.imageset/Back@3x.png +0 -0
  43. package/ios/Plugin/Assets.xcassets/Back.imageset/Contents.json +26 -0
  44. package/ios/Plugin/Assets.xcassets/Contents.json +6 -0
  45. package/ios/Plugin/Assets.xcassets/Forward.imageset/Contents.json +26 -0
  46. package/ios/Plugin/Assets.xcassets/Forward.imageset/Forward.png +0 -0
  47. package/ios/Plugin/Assets.xcassets/Forward.imageset/Forward@2x.png +0 -0
  48. package/ios/Plugin/Assets.xcassets/Forward.imageset/Forward@3x.png +0 -0
  49. package/ios/Plugin/Enums.swift +65 -0
  50. package/ios/Plugin/InAppBrowserPlugin.h +10 -0
  51. package/ios/Plugin/InAppBrowserPlugin.m +21 -0
  52. package/ios/Plugin/InAppBrowserPlugin.swift +434 -0
  53. package/ios/Plugin/Info.plist +24 -0
  54. package/ios/Plugin/WKWebViewController.swift +1021 -0
  55. package/package.json +83 -0
package/README.md ADDED
@@ -0,0 +1,690 @@
1
+ # @capgo/inappbrowser
2
+ <a href="https://capgo.app/"><img src='https://raw.githubusercontent.com/Cap-go/capgo/main/assets/capgo_banner.png' alt='Capgo - Instant updates for capacitor'/></a>
3
+
4
+ <div align="center">
5
+ <h2><a href="https://capgo.app/?ref=plugin"> ➡️ Get Instant updates for your App with Capgo 🚀</a></h2>
6
+ <h2><a href="https://capgo.app/consulting/?ref=plugin"> Fix your annoying bug now, Hire a Capacitor expert 💪</a></h2>
7
+ </div>
8
+
9
+ Capacitor plugin in app browser with urlChangeEvent
10
+
11
+ ## Install
12
+
13
+ ```bash
14
+ npm install @capgo/inappbrowser
15
+ npx cap sync
16
+ ```
17
+ ## Usage
18
+
19
+ ```js
20
+ import { InAppBrowser } from '@capgo/inappbrowser'
21
+
22
+ InAppBrowser.open({ url: "YOUR_URL" });
23
+ ```
24
+
25
+ Web platform is not supported. Use `window.open` instead.
26
+
27
+ ### Camera usage
28
+
29
+ #### Android
30
+
31
+ Add the following to your `AndroidManifest.xml` file:
32
+
33
+ ```xml
34
+ <uses-permission android:name="android.permission.CAMERA" />
35
+ <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
36
+ <uses-permission android:name="android.permission.RECORD_AUDIO"/>
37
+ ```
38
+
39
+ Then the permission will be asked when the camera is used.
40
+
41
+ #### iOS
42
+
43
+ Add the following to your `Info.plist` file:
44
+
45
+ ```xml
46
+ <key>NSCameraUsageDescription</key>
47
+ <string>We need access to the camera to record audio.</string>
48
+ ```
49
+
50
+ ### Microphone usage
51
+
52
+ #### Android
53
+
54
+ Add the following to your `AndroidManifest.xml` file:
55
+
56
+ ```xml
57
+ <uses-permission android:name="android.permission.RECORD_AUDIO" />
58
+ <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
59
+ ```
60
+
61
+ Then the permission will be asked when the microphone is used.
62
+
63
+ #### iOS
64
+
65
+ Add the following to your `Info.plist` file:
66
+
67
+ ```xml
68
+ <key>NSMicrophoneUsageDescription</key>
69
+ <string>We need access to the microphone to record audio.</string>
70
+ ```
71
+
72
+ ## API
73
+
74
+ <docgen-index>
75
+
76
+ * [`open(...)`](#open)
77
+ * [`clearCookies(...)`](#clearcookies)
78
+ * [`clearAllCookies()`](#clearallcookies)
79
+ * [`clearCache()`](#clearcache)
80
+ * [`getCookies(...)`](#getcookies)
81
+ * [`close()`](#close)
82
+ * [`openWebView(...)`](#openwebview)
83
+ * [`executeScript(...)`](#executescript)
84
+ * [`postMessage(...)`](#postmessage)
85
+ * [`setUrl(...)`](#seturl)
86
+ * [`addListener('urlChangeEvent', ...)`](#addlistenerurlchangeevent-)
87
+ * [`addListener('buttonNearDoneClick', ...)`](#addlistenerbuttonneardoneclick-)
88
+ * [`addListener('closeEvent', ...)`](#addlistenercloseevent-)
89
+ * [`addListener('confirmBtnClicked', ...)`](#addlistenerconfirmbtnclicked-)
90
+ * [`addListener('messageFromWebview', ...)`](#addlistenermessagefromwebview-)
91
+ * [`addListener('browserPageLoaded', ...)`](#addlistenerbrowserpageloaded-)
92
+ * [`addListener('pageLoadError', ...)`](#addlistenerpageloaderror-)
93
+ * [`removeAllListeners()`](#removealllisteners)
94
+ * [`reload()`](#reload)
95
+ * [Interfaces](#interfaces)
96
+ * [Type Aliases](#type-aliases)
97
+ * [Enums](#enums)
98
+
99
+ </docgen-index>
100
+
101
+ <docgen-api>
102
+ <!--Update the source file JSDoc comments and rerun docgen to update the docs below-->
103
+
104
+ ### open(...)
105
+
106
+ ```typescript
107
+ open(options: OpenOptions) => Promise<any>
108
+ ```
109
+
110
+ Open url in a new window fullscreen
111
+
112
+ | Param | Type |
113
+ | ------------- | --------------------------------------------------- |
114
+ | **`options`** | <code><a href="#openoptions">OpenOptions</a></code> |
115
+
116
+ **Returns:** <code>Promise&lt;any&gt;</code>
117
+
118
+ **Since:** 0.1.0
119
+
120
+ --------------------
121
+
122
+
123
+ ### clearCookies(...)
124
+
125
+ ```typescript
126
+ clearCookies(options: ClearCookieOptions) => Promise<any>
127
+ ```
128
+
129
+ Clear cookies of url
130
+
131
+ | Param | Type |
132
+ | ------------- | ----------------------------------------------------------------- |
133
+ | **`options`** | <code><a href="#clearcookieoptions">ClearCookieOptions</a></code> |
134
+
135
+ **Returns:** <code>Promise&lt;any&gt;</code>
136
+
137
+ **Since:** 0.5.0
138
+
139
+ --------------------
140
+
141
+
142
+ ### clearAllCookies()
143
+
144
+ ```typescript
145
+ clearAllCookies() => Promise<any>
146
+ ```
147
+
148
+ Clear all cookies
149
+
150
+ **Returns:** <code>Promise&lt;any&gt;</code>
151
+
152
+ **Since:** 6.5.0
153
+
154
+ --------------------
155
+
156
+
157
+ ### clearCache()
158
+
159
+ ```typescript
160
+ clearCache() => Promise<any>
161
+ ```
162
+
163
+ Clear cache
164
+
165
+ **Returns:** <code>Promise&lt;any&gt;</code>
166
+
167
+ **Since:** 6.5.0
168
+
169
+ --------------------
170
+
171
+
172
+ ### getCookies(...)
173
+
174
+ ```typescript
175
+ getCookies(options: GetCookieOptions) => Promise<Record<string, string>>
176
+ ```
177
+
178
+ Get cookies for a specific URL.
179
+
180
+ | Param | Type | Description |
181
+ | ------------- | ------------------------------------------------------------- | -------------------------------------------------- |
182
+ | **`options`** | <code><a href="#getcookieoptions">GetCookieOptions</a></code> | The options, including the URL to get cookies for. |
183
+
184
+ **Returns:** <code>Promise&lt;<a href="#record">Record</a>&lt;string, string&gt;&gt;</code>
185
+
186
+ --------------------
187
+
188
+
189
+ ### close()
190
+
191
+ ```typescript
192
+ close() => Promise<any>
193
+ ```
194
+
195
+ Close the webview.
196
+
197
+ **Returns:** <code>Promise&lt;any&gt;</code>
198
+
199
+ --------------------
200
+
201
+
202
+ ### openWebView(...)
203
+
204
+ ```typescript
205
+ openWebView(options: OpenWebViewOptions) => Promise<any>
206
+ ```
207
+
208
+ Open url in a new webview with toolbars, and enhanced capabilities, like camera access, file access, listen events, inject javascript, bi directional communication, etc.
209
+
210
+ | Param | Type |
211
+ | ------------- | ----------------------------------------------------------------- |
212
+ | **`options`** | <code><a href="#openwebviewoptions">OpenWebViewOptions</a></code> |
213
+
214
+ **Returns:** <code>Promise&lt;any&gt;</code>
215
+
216
+ **Since:** 0.1.0
217
+
218
+ --------------------
219
+
220
+
221
+ ### executeScript(...)
222
+
223
+ ```typescript
224
+ executeScript({ code }: { code: string; }) => Promise<void>
225
+ ```
226
+
227
+ Injects JavaScript code into the InAppBrowser window.
228
+
229
+ | Param | Type |
230
+ | --------- | ------------------------------ |
231
+ | **`__0`** | <code>{ code: string; }</code> |
232
+
233
+ --------------------
234
+
235
+
236
+ ### postMessage(...)
237
+
238
+ ```typescript
239
+ postMessage(options: { detail: Record<string, any>; }) => Promise<void>
240
+ ```
241
+
242
+ Sends an event to the webview. you can listen to this event with addListener("messageFromWebview", listenerFunc: (event: <a href="#record">Record</a>&lt;string, any&gt;) =&gt; void)
243
+ detail is the data you want to send to the webview, it's a requirement of Capacitor we cannot send direct objects
244
+ Your object has to be serializable to JSON, so no functions or other non-JSON-serializable types are allowed.
245
+
246
+ | Param | Type |
247
+ | ------------- | ------------------------------------------------------------------------- |
248
+ | **`options`** | <code>{ detail: <a href="#record">Record</a>&lt;string, any&gt;; }</code> |
249
+
250
+ --------------------
251
+
252
+
253
+ ### setUrl(...)
254
+
255
+ ```typescript
256
+ setUrl(options: { url: string; }) => Promise<any>
257
+ ```
258
+
259
+ Sets the URL of the webview.
260
+
261
+ | Param | Type |
262
+ | ------------- | ----------------------------- |
263
+ | **`options`** | <code>{ url: string; }</code> |
264
+
265
+ **Returns:** <code>Promise&lt;any&gt;</code>
266
+
267
+ --------------------
268
+
269
+
270
+ ### addListener('urlChangeEvent', ...)
271
+
272
+ ```typescript
273
+ addListener(eventName: "urlChangeEvent", listenerFunc: UrlChangeListener) => Promise<PluginListenerHandle>
274
+ ```
275
+
276
+ Listen for url change, only for openWebView
277
+
278
+ | Param | Type |
279
+ | ------------------ | --------------------------------------------------------------- |
280
+ | **`eventName`** | <code>'urlChangeEvent'</code> |
281
+ | **`listenerFunc`** | <code><a href="#urlchangelistener">UrlChangeListener</a></code> |
282
+
283
+ **Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>
284
+
285
+ **Since:** 0.0.1
286
+
287
+ --------------------
288
+
289
+
290
+ ### addListener('buttonNearDoneClick', ...)
291
+
292
+ ```typescript
293
+ addListener(eventName: "buttonNearDoneClick", listenerFunc: ButtonNearListener) => Promise<PluginListenerHandle>
294
+ ```
295
+
296
+ | Param | Type |
297
+ | ------------------ | ----------------------------------------------------------------- |
298
+ | **`eventName`** | <code>'buttonNearDoneClick'</code> |
299
+ | **`listenerFunc`** | <code><a href="#buttonnearlistener">ButtonNearListener</a></code> |
300
+
301
+ **Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>
302
+
303
+ --------------------
304
+
305
+
306
+ ### addListener('closeEvent', ...)
307
+
308
+ ```typescript
309
+ addListener(eventName: "closeEvent", listenerFunc: UrlChangeListener) => Promise<PluginListenerHandle>
310
+ ```
311
+
312
+ Listen for close click only for openWebView
313
+
314
+ | Param | Type |
315
+ | ------------------ | --------------------------------------------------------------- |
316
+ | **`eventName`** | <code>'closeEvent'</code> |
317
+ | **`listenerFunc`** | <code><a href="#urlchangelistener">UrlChangeListener</a></code> |
318
+
319
+ **Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>
320
+
321
+ **Since:** 0.4.0
322
+
323
+ --------------------
324
+
325
+
326
+ ### addListener('confirmBtnClicked', ...)
327
+
328
+ ```typescript
329
+ addListener(eventName: "confirmBtnClicked", listenerFunc: ConfirmBtnListener) => Promise<PluginListenerHandle>
330
+ ```
331
+
332
+ Will be triggered when user clicks on confirm button when disclaimer is required, works only on iOS
333
+
334
+ | Param | Type |
335
+ | ------------------ | ----------------------------------------------------------------- |
336
+ | **`eventName`** | <code>'confirmBtnClicked'</code> |
337
+ | **`listenerFunc`** | <code><a href="#confirmbtnlistener">ConfirmBtnListener</a></code> |
338
+
339
+ **Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>
340
+
341
+ **Since:** 0.0.1
342
+
343
+ --------------------
344
+
345
+
346
+ ### addListener('messageFromWebview', ...)
347
+
348
+ ```typescript
349
+ addListener(eventName: "messageFromWebview", listenerFunc: (event: { detail: Record<string, any>; }) => void) => Promise<PluginListenerHandle>
350
+ ```
351
+
352
+ Will be triggered when event is sent from webview, to send an event to the webview use window.mobileApp.postMessage({ "detail": { "message": "myMessage" } })
353
+ detail is the data you want to send to the webview, it's a requirement of Capacitor we cannot send direct objects
354
+ Your object has to be serializable to JSON, so no functions or other non-JSON-serializable types are allowed.
355
+
356
+ This method is inject at runtime in the webview
357
+
358
+ | Param | Type |
359
+ | ------------------ | --------------------------------------------------------------------------------------------- |
360
+ | **`eventName`** | <code>'messageFromWebview'</code> |
361
+ | **`listenerFunc`** | <code>(event: { detail: <a href="#record">Record</a>&lt;string, any&gt;; }) =&gt; void</code> |
362
+
363
+ **Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>
364
+
365
+ --------------------
366
+
367
+
368
+ ### addListener('browserPageLoaded', ...)
369
+
370
+ ```typescript
371
+ addListener(eventName: "browserPageLoaded", listenerFunc: () => void) => Promise<PluginListenerHandle>
372
+ ```
373
+
374
+ Will be triggered when page is loaded
375
+
376
+ | Param | Type |
377
+ | ------------------ | -------------------------------- |
378
+ | **`eventName`** | <code>'browserPageLoaded'</code> |
379
+ | **`listenerFunc`** | <code>() =&gt; void</code> |
380
+
381
+ **Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>
382
+
383
+ --------------------
384
+
385
+
386
+ ### addListener('pageLoadError', ...)
387
+
388
+ ```typescript
389
+ addListener(eventName: "pageLoadError", listenerFunc: () => void) => Promise<PluginListenerHandle>
390
+ ```
391
+
392
+ Will be triggered when page load error
393
+
394
+ | Param | Type |
395
+ | ------------------ | ---------------------------- |
396
+ | **`eventName`** | <code>'pageLoadError'</code> |
397
+ | **`listenerFunc`** | <code>() =&gt; void</code> |
398
+
399
+ **Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>
400
+
401
+ --------------------
402
+
403
+
404
+ ### removeAllListeners()
405
+
406
+ ```typescript
407
+ removeAllListeners() => Promise<void>
408
+ ```
409
+
410
+ Remove all listeners for this plugin.
411
+
412
+ **Since:** 1.0.0
413
+
414
+ --------------------
415
+
416
+
417
+ ### reload()
418
+
419
+ ```typescript
420
+ reload() => Promise<any>
421
+ ```
422
+
423
+ Reload the current web page.
424
+
425
+ **Returns:** <code>Promise&lt;any&gt;</code>
426
+
427
+ **Since:** 1.0.0
428
+
429
+ --------------------
430
+
431
+
432
+ ### Interfaces
433
+
434
+
435
+ #### OpenOptions
436
+
437
+ | Prop | Type | Description | Since |
438
+ | ---------------------------- | --------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | ----- |
439
+ | **`url`** | <code>string</code> | Target URL to load. | 0.1.0 |
440
+ | **`headers`** | <code><a href="#headers">Headers</a></code> | <a href="#headers">Headers</a> to send with the request. | 0.1.0 |
441
+ | **`credentials`** | <code><a href="#credentials">Credentials</a></code> | <a href="#credentials">Credentials</a> to send with the request and all subsequent requests for the same host. | 6.1.0 |
442
+ | **`isPresentAfterPageLoad`** | <code>boolean</code> | if true, the browser will be presented after the page is loaded, if false, the browser will be presented immediately. | 0.1.0 |
443
+ | **`preventDeeplink`** | <code>boolean</code> | | |
444
+
445
+
446
+ #### Headers
447
+
448
+
449
+ #### Credentials
450
+
451
+ | Prop | Type |
452
+ | -------------- | ------------------- |
453
+ | **`username`** | <code>string</code> |
454
+ | **`password`** | <code>string</code> |
455
+
456
+
457
+ #### ClearCookieOptions
458
+
459
+ | Prop | Type |
460
+ | --------- | ------------------- |
461
+ | **`url`** | <code>string</code> |
462
+
463
+
464
+ #### HttpCookie
465
+
466
+ | Prop | Type | Description |
467
+ | ----------- | ------------------- | ------------------------ |
468
+ | **`url`** | <code>string</code> | The URL of the cookie. |
469
+ | **`key`** | <code>string</code> | The key of the cookie. |
470
+ | **`value`** | <code>string</code> | The value of the cookie. |
471
+
472
+
473
+ #### GetCookieOptions
474
+
475
+ | Prop | Type |
476
+ | --------------------- | -------------------- |
477
+ | **`url`** | <code>string</code> |
478
+ | **`includeHttpOnly`** | <code>boolean</code> |
479
+
480
+
481
+ #### OpenWebViewOptions
482
+
483
+ | Prop | Type | Description | Default | Since |
484
+ | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- | ------ |
485
+ | **`url`** | <code>string</code> | Target URL to load. | | 0.1.0 |
486
+ | **`headers`** | <code><a href="#headers">Headers</a></code> | <a href="#headers">Headers</a> to send with the request. | | 0.1.0 |
487
+ | **`credentials`** | <code><a href="#credentials">Credentials</a></code> | <a href="#credentials">Credentials</a> to send with the request and all subsequent requests for the same host. | | 6.1.0 |
488
+ | **`shareDisclaimer`** | <code><a href="#disclaimeroptions">DisclaimerOptions</a></code> | share options | | 0.1.0 |
489
+ | **`toolbarType`** | <code><a href="#toolbartype">ToolBarType</a></code> | Toolbar type | <code>ToolBarType.DEFAULT</code> | 0.1.0 |
490
+ | **`shareSubject`** | <code>string</code> | Share subject | | 0.1.0 |
491
+ | **`title`** | <code>string</code> | Title of the browser | <code>'New Window'</code> | 0.1.0 |
492
+ | **`backgroundColor`** | <code><a href="#backgroundcolor">BackgroundColor</a></code> | Background color of the browser, only on IOS | <code>BackgroundColor.BLACK</code> | 0.1.0 |
493
+ | **`activeNativeNavigationForWebview`** | <code>boolean</code> | If true, active the native navigation within the webview, Android only | <code>false</code> | |
494
+ | **`disableGoBackOnNativeApplication`** | <code>boolean</code> | Disable the possibility to go back on native application, usefull to force user to stay on the webview, Android only | <code>false</code> | |
495
+ | **`isPresentAfterPageLoad`** | <code>boolean</code> | Open url in a new window fullscreen isPresentAfterPageLoad: if true, the browser will be presented after the page is loaded, if false, the browser will be presented immediately. | <code>false</code> | 0.1.0 |
496
+ | **`isInspectable`** | <code>boolean</code> | Whether the website in the webview is inspectable or not, ios only | <code>false</code> | |
497
+ | **`isAnimated`** | <code>boolean</code> | Whether the webview opening is animated or not, ios only | <code>true</code> | |
498
+ | **`showReloadButton`** | <code>boolean</code> | Shows a reload button that reloads the web page | <code>false</code> | 1.0.15 |
499
+ | **`closeModal`** | <code>boolean</code> | CloseModal: if true a confirm will be displayed when user clicks on close button, if false the browser will be closed immediately. | <code>false</code> | 1.1.0 |
500
+ | **`closeModalTitle`** | <code>string</code> | CloseModalTitle: title of the confirm when user clicks on close button, only on IOS | <code>'Close'</code> | 1.1.0 |
501
+ | **`closeModalDescription`** | <code>string</code> | CloseModalDescription: description of the confirm when user clicks on close button, only on IOS | <code>'Are you sure you want to close this window?'</code> | 1.1.0 |
502
+ | **`closeModalOk`** | <code>string</code> | CloseModalOk: text of the confirm button when user clicks on close button, only on IOS | <code>'Close'</code> | 1.1.0 |
503
+ | **`closeModalCancel`** | <code>string</code> | CloseModalCancel: text of the cancel button when user clicks on close button, only on IOS | <code>'Cancel'</code> | 1.1.0 |
504
+ | **`visibleTitle`** | <code>boolean</code> | visibleTitle: if true the website title would be shown else shown empty | <code>true</code> | 1.2.5 |
505
+ | **`toolbarColor`** | <code>string</code> | toolbarColor: color of the toolbar in hex format | <code>'#ffffff''</code> | 1.2.5 |
506
+ | **`showArrow`** | <code>boolean</code> | showArrow: if true an arrow would be shown instead of cross for closing the window | <code>false</code> | 1.2.5 |
507
+ | **`ignoreUntrustedSSLError`** | <code>boolean</code> | ignoreUntrustedSSLError: if true, the webview will ignore untrusted SSL errors allowing the user to view the website. | <code>false</code> | 6.1.0 |
508
+ | **`preShowScript`** | <code><a href="#string">String</a></code> | preShowScript: if isPresentAfterPageLoad is true and this variable is set the plugin will inject a script before showing the browser. This script will be run in an async context. The plugin will wait for the script to finish (max 10 seconds) | | 6.6.0 |
509
+ | **`proxyRequests`** | <code><a href="#string">String</a></code> | proxyRequests is a regex expression. Please see [this pr](https://github.com/Cap-go/capacitor-inappbrowser/pull/222) for more info. (Android only) | | 6.9.0 |
510
+ | **`buttonNearDone`** | <code>{ ios: { iconType: 'sf-symbol' \| 'asset'; icon: <a href="#string">String</a>; }; android: { iconType: 'asset'; icon: <a href="#string">String</a>; width?: number; height?: number; }; }</code> | buttonNearDone allows for a creation of a custom button. Please see [buttonNearDone.md](/buttonNearDone.md) for more info. | | 6.7.0 |
511
+
512
+
513
+ #### DisclaimerOptions
514
+
515
+ | Prop | Type |
516
+ | ---------------- | ------------------- |
517
+ | **`title`** | <code>string</code> |
518
+ | **`message`** | <code>string</code> |
519
+ | **`confirmBtn`** | <code>string</code> |
520
+ | **`cancelBtn`** | <code>string</code> |
521
+
522
+
523
+ #### String
524
+
525
+ Allows manipulation and formatting of text strings and determination and location of substrings within strings.
526
+
527
+ | Prop | Type | Description |
528
+ | ------------ | ------------------- | ------------------------------------------------------------ |
529
+ | **`length`** | <code>number</code> | Returns the length of a <a href="#string">String</a> object. |
530
+
531
+ | Method | Signature | Description |
532
+ | --------------------- | ------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------- |
533
+ | **toString** | () =&gt; string | Returns a string representation of a string. |
534
+ | **charAt** | (pos: number) =&gt; string | Returns the character at the specified index. |
535
+ | **charCodeAt** | (index: number) =&gt; number | Returns the Unicode value of the character at the specified location. |
536
+ | **concat** | (...strings: string[]) =&gt; string | Returns a string that contains the concatenation of two or more strings. |
537
+ | **indexOf** | (searchString: string, position?: number \| undefined) =&gt; number | Returns the position of the first occurrence of a substring. |
538
+ | **lastIndexOf** | (searchString: string, position?: number \| undefined) =&gt; number | Returns the last occurrence of a substring in the string. |
539
+ | **localeCompare** | (that: string) =&gt; number | Determines whether two strings are equivalent in the current locale. |
540
+ | **match** | (regexp: string \| <a href="#regexp">RegExp</a>) =&gt; <a href="#regexpmatcharray">RegExpMatchArray</a> \| null | Matches a string with a regular expression, and returns an array containing the results of that search. |
541
+ | **replace** | (searchValue: string \| <a href="#regexp">RegExp</a>, replaceValue: string) =&gt; string | Replaces text in a string, using a regular expression or search string. |
542
+ | **replace** | (searchValue: string \| <a href="#regexp">RegExp</a>, replacer: (substring: string, ...args: any[]) =&gt; string) =&gt; string | Replaces text in a string, using a regular expression or search string. |
543
+ | **search** | (regexp: string \| <a href="#regexp">RegExp</a>) =&gt; number | Finds the first substring match in a regular expression search. |
544
+ | **slice** | (start?: number \| undefined, end?: number \| undefined) =&gt; string | Returns a section of a string. |
545
+ | **split** | (separator: string \| <a href="#regexp">RegExp</a>, limit?: number \| undefined) =&gt; string[] | Split a string into substrings using the specified separator and return them as an array. |
546
+ | **substring** | (start: number, end?: number \| undefined) =&gt; string | Returns the substring at the specified location within a <a href="#string">String</a> object. |
547
+ | **toLowerCase** | () =&gt; string | Converts all the alphabetic characters in a string to lowercase. |
548
+ | **toLocaleLowerCase** | (locales?: string \| string[] \| undefined) =&gt; string | Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. |
549
+ | **toUpperCase** | () =&gt; string | Converts all the alphabetic characters in a string to uppercase. |
550
+ | **toLocaleUpperCase** | (locales?: string \| string[] \| undefined) =&gt; string | Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. |
551
+ | **trim** | () =&gt; string | Removes the leading and trailing white space and line terminator characters from a string. |
552
+ | **substr** | (from: number, length?: number \| undefined) =&gt; string | Gets a substring beginning at the specified location and having the specified length. |
553
+ | **valueOf** | () =&gt; string | Returns the primitive value of the specified object. |
554
+
555
+
556
+ #### RegExpMatchArray
557
+
558
+ | Prop | Type |
559
+ | ----------- | ------------------- |
560
+ | **`index`** | <code>number</code> |
561
+ | **`input`** | <code>string</code> |
562
+
563
+
564
+ #### RegExp
565
+
566
+ | Prop | Type | Description |
567
+ | ---------------- | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
568
+ | **`source`** | <code>string</code> | Returns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal. |
569
+ | **`global`** | <code>boolean</code> | Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. |
570
+ | **`ignoreCase`** | <code>boolean</code> | Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. |
571
+ | **`multiline`** | <code>boolean</code> | Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. |
572
+ | **`lastIndex`** | <code>number</code> | |
573
+
574
+ | Method | Signature | Description |
575
+ | ----------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
576
+ | **exec** | (string: string) =&gt; <a href="#regexpexecarray">RegExpExecArray</a> \| null | Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search. |
577
+ | **test** | (string: string) =&gt; boolean | Returns a Boolean value that indicates whether or not a pattern exists in a searched string. |
578
+ | **compile** | () =&gt; this | |
579
+
580
+
581
+ #### RegExpExecArray
582
+
583
+ | Prop | Type |
584
+ | ----------- | ------------------- |
585
+ | **`index`** | <code>number</code> |
586
+ | **`input`** | <code>string</code> |
587
+
588
+
589
+ #### PluginListenerHandle
590
+
591
+ | Prop | Type |
592
+ | ------------ | ----------------------------------------- |
593
+ | **`remove`** | <code>() =&gt; Promise&lt;void&gt;</code> |
594
+
595
+
596
+ #### UrlEvent
597
+
598
+ | Prop | Type | Description | Since |
599
+ | --------- | ------------------- | ------------------------- | ----- |
600
+ | **`url`** | <code>string</code> | Emit when the url changes | 0.0.1 |
601
+
602
+
603
+ #### BtnEvent
604
+
605
+ | Prop | Type | Description | Since |
606
+ | --------- | ------------------- | ------------------------------ | ----- |
607
+ | **`url`** | <code>string</code> | Emit when a button is clicked. | 0.0.1 |
608
+
609
+
610
+ ### Type Aliases
611
+
612
+
613
+ #### ClearCookieOptions
614
+
615
+ <code><a href="#omit">Omit</a>&lt;<a href="#httpcookie">HttpCookie</a>, 'key' | 'value'&gt;</code>
616
+
617
+
618
+ #### Omit
619
+
620
+ Construct a type with the properties of T except for those in type K.
621
+
622
+ <code><a href="#pick">Pick</a>&lt;T, <a href="#exclude">Exclude</a>&lt;keyof T, K&gt;&gt;</code>
623
+
624
+
625
+ #### Pick
626
+
627
+ From T, pick a set of properties whose keys are in the union K
628
+
629
+ <code>{
630
  [P in K]: T[P];
1
631
  }</code>
632
+
633
+
634
+ #### Exclude
635
+
636
+ <a href="#exclude">Exclude</a> from T those types that are assignable to U
637
+
638
+ <code>T extends U ? never : T</code>
639
+
640
+
641
+ #### Record
642
+
643
+ Construct a type with a set of properties K of type T
644
+
645
+ <code>{
2
646
  [P in K]: T;
3
647
  }</code>
648
+
649
+
650
+ #### GetCookieOptions
651
+
652
+ <code><a href="#omit">Omit</a>&lt;<a href="#httpcookie">HttpCookie</a>, 'key' | 'value'&gt;</code>
653
+
654
+
655
+ #### UrlChangeListener
656
+
657
+ <code>(state: <a href="#urlevent">UrlEvent</a>): void</code>
658
+
659
+
660
+ #### ButtonNearListener
661
+
662
+ <code>(state: {}): void</code>
663
+
664
+
665
+ #### ConfirmBtnListener
666
+
667
+ <code>(state: <a href="#btnevent">BtnEvent</a>): void</code>
668
+
669
+
670
+ ### Enums
671
+
672
+
673
+ #### ToolBarType
674
+
675
+ | Members | Value |
676
+ | ---------------- | ------------------------- |
677
+ | **`ACTIVITY`** | <code>"activity"</code> |
678
+ | **`NAVIGATION`** | <code>"navigation"</code> |
679
+ | **`BLANK`** | <code>"blank"</code> |
680
+ | **`DEFAULT`** | <code>""</code> |
681
+
682
+
683
+ #### BackgroundColor
684
+
685
+ | Members | Value |
686
+ | ----------- | -------------------- |
687
+ | **`WHITE`** | <code>"white"</code> |
688
+ | **`BLACK`** | <code>"black"</code> |
689
+
690
+ </docgen-api>
691
+
692
+ **Credits**
693
+ - [WKWebViewController](https://github.com/Meniny/WKWebViewController) - for iOS
694
+ - [CapBrowser](https://github.com/gadapa-rakesh/CapBrowser) - For the base in capacitor v2