# Dialog

```ts
type Dialog = 
  | {
  mainFrame?: boolean;
  message: string;
  type: "alert" | "confirm";
  url: string;
}
  | {
  defaultValue: string | null;
  mainFrame?: boolean;
  message: string;
  type: "prompt";
  url: string;
};
```

A page's `alert`, `confirm` or `prompt`, for [dialogs](<https://rasmuskard.github.io/react-native-minimal-webview/typescript/extensions/functions/dialogs/index.md>).

**Union Members**

**Type Literal**

```ts
{
  mainFrame?: boolean;
  message: string;
  type: "alert" | "confirm";
  url: string;
}
```

**mainFrame?**

```ts
mainFrame?: boolean;
```

**`iOS`**

Whether the main frame opened it.

**message**

```ts
message: string;
```

**type**

```ts
type: "alert" | "confirm";
```

**url**

```ts
url: string;
```

The URL of the frame that opened it.

---

**Type Literal**

```ts
{
  defaultValue: string | null;
  mainFrame?: boolean;
  message: string;
  type: "prompt";
  url: string;
}
```

**defaultValue**

```ts
defaultValue: string | null;
```

The prompt's default text.

**mainFrame?**

```ts
mainFrame?: boolean;
```

**`iOS`**

Whether the main frame opened it.

**message**

```ts
message: string;
```

**type**

```ts
type: "prompt";
```

**url**

```ts
url: string;
```

The URL of the frame that opened it.
