npm package: @nadlowebagentur/capacitor-in-app-browser
Description: Open InApp webView based browser
Author: @themarchenko
Latest version: 0.0.16

# capacitor-in-app-browser

Open InApp webView based browser

## Install

```bash
npm install capacitor-in-app-browser
npx cap sync
```

## API

<docgen-index>

* [`open(...)`](#open)
* [`navigate(...)`](#navigate)
* [`close()`](#close)
* [`back()`](#back)
* [`forward()`](#forward)
* [`reload()`](#reload)
* [`canGoForward()`](#cangoforward)
* [`canGoBack()`](#cangoback)
* [`setMode(...)`](#setmode)
* [`addListener('urlChanged', ...)`](#addlistenerurlchanged)
* [Interfaces](#interfaces)

</docgen-index>

<docgen-api>
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->

### open(...)

```typescript
open(options: { url: string; marginTop?: number; allowedOrigins?: string[]; blockedOrigins?: string[]; blockTitle?: string; blockMessage?: string; strictOrigin?: boolean; userAgent?: string; }) => Promise<void>
```

| Param         | Type                                                                                                                                                                                            |
| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`options`** | <code>{ url: string; marginTop?: number; allowedOrigins?: string[]; blockedOrigins?: string[]; blockTitle?: string; blockMessage?: string; strictOrigin?: boolean; userAgent?: string; }</code> |

--------------------


### navigate(...)

```typescript
navigate(options: { url: string; }) => Promise<void>
```

| Param         | Type                          |
| ------------- | ----------------------------- |
| **`options`** | <code>{ url: string; }</code> |

--------------------


### close()

```typescript
close() => Promise<void>
```

--------------------


### back()

```typescript
back() => Promise<void>
```

--------------------


### forward()

```typescript
forward() => Promise<void>
```

--------------------


### reload()

```typescript
reload() => Promise<void>
```

--------------------


### canGoForward()

```typescript
canGoForward() => Promise<{ value: boolean; }>
```

**Returns:** <code>Promise&lt;{ value: boolean; }&gt;</code>

--------------------


### canGoBack()

```typescript
canGoBack() => Promise<{ value: boolean; }>
```

**Returns:** <code>Promise&lt;{ value: boolean; }&gt;</code>

--------------------


### setMode(...)

```typescript
setMode(params: { mode: 'front' | 'back'; }) => Promise<void>
```

Controls whether the native in-app browser view is rendered
in front of or behind the app WebView.

- `front`: show the native in-app browser on top.
- `back`: place the native in-app browser behind the web layer.

| Param        | Type                                      |
| ------------ | ----------------------------------------- |
| **`params`** | <code>{ mode: 'front' \| 'back'; }</code> |

--------------------


### addListener('urlChanged', ...)

```typescript
addListener(eventName: 'urlChanged', listenerFunc: (data: { url: string; }) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
```

iOS only: Listen for the browser url changed event.
It fires when the Browser navigate to other URL.

| Param              | Type                                             |
| ------------------ | ------------------------------------------------ |
| **`eventName`**    | <code>'urlChanged'</code>                        |
| **`listenerFunc`** | <code>(data: { url: string; }) =&gt; void</code> |

**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt; & <a href="#pluginlistenerhandle">PluginListenerHandle</a></code>

**Since:** 0.0.1

--------------------


### Interfaces


#### PluginListenerHandle

| Prop         | Type                                      |
| ------------ | ----------------------------------------- |
| **`remove`** | <code>() =&gt; Promise&lt;void&gt;</code> |

</docgen-api>