@capgo/inappbrowser 7.0.0 → 7.1.1

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/README.md CHANGED
@@ -1,8 +1,11 @@
1
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
- <div align="center">
4
- <h2><a href="https://capgo.app/">Check out: Capgo — Instant updates for capacitor</a></h2>
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>
5
7
  </div>
8
+
6
9
  Capacitor plugin in app browser with urlChangeEvent
7
10
 
8
11
  ## Install
@@ -16,7 +19,54 @@ npx cap sync
16
19
  ```js
17
20
  import { InAppBrowser } from '@capgo/inappbrowser'
18
21
 
19
- InAppBrowser.open("YOUR_URL");
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>
20
70
  ```
21
71
 
22
72
  ## API
@@ -24,14 +74,24 @@ InAppBrowser.open("YOUR_URL");
24
74
  <docgen-index>
25
75
 
26
76
  * [`open(...)`](#open)
27
- * [`clearCookies()`](#clearcookies)
77
+ * [`clearCookies(...)`](#clearcookies)
78
+ * [`clearAllCookies()`](#clearallcookies)
79
+ * [`clearCache()`](#clearcache)
80
+ * [`getCookies(...)`](#getcookies)
28
81
  * [`close()`](#close)
29
82
  * [`openWebView(...)`](#openwebview)
83
+ * [`executeScript(...)`](#executescript)
84
+ * [`postMessage(...)`](#postmessage)
30
85
  * [`setUrl(...)`](#seturl)
31
- * [`addListener('urlChangeEvent', ...)`](#addlistenerurlchangeevent)
32
- * [`addListener('closeEvent', ...)`](#addlistenercloseevent)
33
- * [`addListener('confirmBtnClicked', ...)`](#addlistenerconfirmbtnclicked)
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-)
34
93
  * [`removeAllListeners()`](#removealllisteners)
94
+ * [`reload()`](#reload)
35
95
  * [Interfaces](#interfaces)
36
96
  * [Type Aliases](#type-aliases)
37
97
  * [Enums](#enums)
@@ -44,7 +104,7 @@ InAppBrowser.open("YOUR_URL");
44
104
  ### open(...)
45
105
 
46
106
  ```typescript
47
- open(options: OpenOptions) => any
107
+ open(options: OpenOptions) => Promise<any>
48
108
  ```
49
109
 
50
110
  Open url in a new window fullscreen
@@ -53,35 +113,88 @@ Open url in a new window fullscreen
53
113
  | ------------- | --------------------------------------------------- |
54
114
  | **`options`** | <code><a href="#openoptions">OpenOptions</a></code> |
55
115
 
56
- **Returns:** <code>any</code>
116
+ **Returns:** <code>Promise&lt;any&gt;</code>
57
117
 
58
118
  **Since:** 0.1.0
59
119
 
60
120
  --------------------
61
121
 
62
122
 
63
- ### clearCookies()
123
+ ### clearCookies(...)
64
124
 
65
125
  ```typescript
66
- clearCookies() => any
126
+ clearCookies(options: ClearCookieOptions) => Promise<any>
67
127
  ```
68
128
 
69
- Clear all cookies
129
+ Clear cookies of url
70
130
 
71
- **Returns:** <code>any</code>
131
+ | Param | Type |
132
+ | ------------- | ----------------------------------------------------------------- |
133
+ | **`options`** | <code><a href="#clearcookieoptions">ClearCookieOptions</a></code> |
134
+
135
+ **Returns:** <code>Promise&lt;any&gt;</code>
72
136
 
73
137
  **Since:** 0.5.0
74
138
 
75
139
  --------------------
76
140
 
77
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
+
78
189
  ### close()
79
190
 
80
191
  ```typescript
81
- close() => any
192
+ close() => Promise<any>
82
193
  ```
83
194
 
84
- **Returns:** <code>any</code>
195
+ Close the webview.
196
+
197
+ **Returns:** <code>Promise&lt;any&gt;</code>
85
198
 
86
199
  --------------------
87
200
 
@@ -89,33 +202,67 @@ close() => any
89
202
  ### openWebView(...)
90
203
 
91
204
  ```typescript
92
- openWebView(options: OpenWebViewOptions) => any
205
+ openWebView(options: OpenWebViewOptions) => Promise<any>
93
206
  ```
94
207
 
95
- Open url in a new webview with toolbars
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.
96
209
 
97
210
  | Param | Type |
98
211
  | ------------- | ----------------------------------------------------------------- |
99
212
  | **`options`** | <code><a href="#openwebviewoptions">OpenWebViewOptions</a></code> |
100
213
 
101
- **Returns:** <code>any</code>
214
+ **Returns:** <code>Promise&lt;any&gt;</code>
102
215
 
103
216
  **Since:** 0.1.0
104
217
 
105
218
  --------------------
106
219
 
107
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
+
108
253
  ### setUrl(...)
109
254
 
110
255
  ```typescript
111
- setUrl(options: { url: string; }) => any
256
+ setUrl(options: { url: string; }) => Promise<any>
112
257
  ```
113
258
 
259
+ Sets the URL of the webview.
260
+
114
261
  | Param | Type |
115
262
  | ------------- | ----------------------------- |
116
263
  | **`options`** | <code>{ url: string; }</code> |
117
264
 
118
- **Returns:** <code>any</code>
265
+ **Returns:** <code>Promise&lt;any&gt;</code>
119
266
 
120
267
  --------------------
121
268
 
@@ -123,37 +270,53 @@ setUrl(options: { url: string; }) => any
123
270
  ### addListener('urlChangeEvent', ...)
124
271
 
125
272
  ```typescript
126
- addListener(eventName: "urlChangeEvent", listenerFunc: UrlChangeListener) => Promise<PluginListenerHandle> & PluginListenerHandle
273
+ addListener(eventName: "urlChangeEvent", listenerFunc: UrlChangeListener) => Promise<PluginListenerHandle>
127
274
  ```
128
275
 
129
- Listen for url change
276
+ Listen for url change, only for openWebView
130
277
 
131
278
  | Param | Type |
132
279
  | ------------------ | --------------------------------------------------------------- |
133
280
  | **`eventName`** | <code>'urlChangeEvent'</code> |
134
281
  | **`listenerFunc`** | <code><a href="#urlchangelistener">UrlChangeListener</a></code> |
135
282
 
136
- **Returns:** <code>any</code>
283
+ **Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>
137
284
 
138
285
  **Since:** 0.0.1
139
286
 
140
287
  --------------------
141
288
 
142
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
+
143
306
  ### addListener('closeEvent', ...)
144
307
 
145
308
  ```typescript
146
- addListener(eventName: "closeEvent", listenerFunc: UrlChangeListener) => Promise<PluginListenerHandle> & PluginListenerHandle
309
+ addListener(eventName: "closeEvent", listenerFunc: UrlChangeListener) => Promise<PluginListenerHandle>
147
310
  ```
148
311
 
149
- Listen for close click
312
+ Listen for close click only for openWebView
150
313
 
151
314
  | Param | Type |
152
315
  | ------------------ | --------------------------------------------------------------- |
153
316
  | **`eventName`** | <code>'closeEvent'</code> |
154
317
  | **`listenerFunc`** | <code><a href="#urlchangelistener">UrlChangeListener</a></code> |
155
318
 
156
- **Returns:** <code>any</code>
319
+ **Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>
157
320
 
158
321
  **Since:** 0.4.0
159
322
 
@@ -163,7 +326,7 @@ Listen for close click
163
326
  ### addListener('confirmBtnClicked', ...)
164
327
 
165
328
  ```typescript
166
- addListener(eventName: "confirmBtnClicked", listenerFunc: ConfirmBtnListener) => Promise<PluginListenerHandle> & PluginListenerHandle
329
+ addListener(eventName: "confirmBtnClicked", listenerFunc: ConfirmBtnListener) => Promise<PluginListenerHandle>
167
330
  ```
168
331
 
169
332
  Will be triggered when user clicks on confirm button when disclaimer is required, works only on iOS
@@ -173,22 +336,93 @@ Will be triggered when user clicks on confirm button when disclaimer is required
173
336
  | **`eventName`** | <code>'confirmBtnClicked'</code> |
174
337
  | **`listenerFunc`** | <code><a href="#confirmbtnlistener">ConfirmBtnListener</a></code> |
175
338
 
176
- **Returns:** <code>any</code>
339
+ **Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>
177
340
 
178
341
  **Since:** 0.0.1
179
342
 
180
343
  --------------------
181
344
 
182
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
+
183
404
  ### removeAllListeners()
184
405
 
185
406
  ```typescript
186
- removeAllListeners() => any
407
+ removeAllListeners() => Promise<void>
187
408
  ```
188
409
 
189
410
  Remove all listeners for this plugin.
190
411
 
191
- **Returns:** <code>any</code>
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>
192
426
 
193
427
  **Since:** 1.0.0
194
428
 
@@ -200,29 +434,80 @@ Remove all listeners for this plugin.
200
434
 
201
435
  #### OpenOptions
202
436
 
203
- | Prop | Type | Description | Since |
204
- | ---------------------------- | ------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | ----- |
205
- | **`url`** | <code>string</code> | Target URL to load. | 0.1.0 |
206
- | **`headers`** | <code><a href="#headers">Headers</a></code> | <a href="#headers">Headers</a> to send with the request. | 0.1.0 |
207
- | **`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 |
208
- | **`preventDeeplink`** | <code>boolean</code> | | |
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> | | |
209
444
 
210
445
 
211
446
  #### Headers
212
447
 
213
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
+
214
481
  #### OpenWebViewOptions
215
482
 
216
- | Prop | Type | Description | Default | Since |
217
- | ---------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- | ----- |
218
- | **`url`** | <code>string</code> | Target URL to load. | | 0.1.0 |
219
- | **`headers`** | <code><a href="#headers">Headers</a></code> | <a href="#headers">Headers</a> to send with the request. | | 0.1.0 |
220
- | **`shareDisclaimer`** | <code><a href="#disclaimeroptions">DisclaimerOptions</a></code> | share options | | 0.1.0 |
221
- | **`toolbarType`** | <code><a href="#toolbartype">ToolBarType</a></code> | Toolbar type | <code>ToolBarType.DEFAULT</code> | 0.1.0 |
222
- | **`shareSubject`** | <code>string</code> | Share subject | | 0.1.0 |
223
- | **`title`** | <code>string</code> | Title of the browser | <code>'New Window'</code> | 0.1.0 |
224
- | **`backgroundColor`** | <code><a href="#backgroundcolor">BackgroundColor</a></code> | Background color of the browser, only on IOS | <code>BackgroundColor.BLACK</code> | 0.1.0 |
225
- | **`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 |
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 |
226
511
 
227
512
 
228
513
  #### DisclaimerOptions
@@ -235,18 +520,84 @@ Remove all listeners for this plugin.
235
520
  | **`cancelBtn`** | <code>string</code> |
236
521
 
237
522
 
238
- #### UrlEvent
523
+ #### String
239
524
 
240
- | Prop | Type | Description | Since |
241
- | --------- | ------------------- | ------------------------- | ----- |
242
- | **`url`** | <code>string</code> | Emit when the url changes | 0.0.1 |
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> |
243
587
 
244
588
 
245
589
  #### PluginListenerHandle
246
590
 
247
- | Prop | Type |
248
- | ------------ | ------------------------- |
249
- | **`remove`** | <code>() =&gt; any</code> |
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 |
250
601
 
251
602
 
252
603
  #### BtnEvent
@@ -259,11 +610,54 @@ Remove all listeners for this plugin.
259
610
  ### Type Aliases
260
611
 
261
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>{
262
630
  [P in K]: T[P];
263
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>{
264
646
  [P in K]: T;
265
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
+
266
655
  #### UrlChangeListener
267
656
 
268
657
  <code>(state: <a href="#urlevent">UrlEvent</a>): void</code>
269
658
 
270
659
 
660
+ #### ButtonNearListener
661
+
662
+ <code>(state: {}): void</code>
663
+
664
+
271
665
  #### ConfirmBtnListener
272
666
 
273
667
  <code>(state: <a href="#btnevent">BtnEvent</a>): void</code>