---
title: WebPage.DialogPresenting
framework: webkit
role: symbol
role_heading: Protocol
path: webkit/webpage/dialogpresenting
---

# WebPage.DialogPresenting

Allows providing custom behavior to handle JavaScript actions and provide a response.

## Declaration

```swift
protocol DialogPresenting
```

## Overview

Overview Typically when handling these, some UI should be presented to the user for them to provide a response, which will then be communicated back to JavaScript. When these methods are invoked, JavaScript is blocked until the async method returns.

## Topics

### Instance Methods

- [handleFileInputPrompt(parameters:initiatedBy:)](webkit/webpage/dialogpresenting/handlefileinputprompt(parameters:initiatedby:).md)
- [handleJavaScriptAlert(message:initiatedBy:)](webkit/webpage/dialogpresenting/handlejavascriptalert(message:initiatedby:).md)
- [handleJavaScriptConfirm(message:initiatedBy:)](webkit/webpage/dialogpresenting/handlejavascriptconfirm(message:initiatedby:).md)
- [handleJavaScriptPrompt(message:defaultText:initiatedBy:)](webkit/webpage/dialogpresenting/handlejavascriptprompt(message:defaulttext:initiatedby:).md)

## See Also

### Customizing JavaScript dialogs

- [WebPage.FileInputPromptResult](webkit/webpage/fileinputpromptresult.md)
- [WebPage.JavaScriptConfirmResult](webkit/webpage/javascriptconfirmresult.md)
- [WebPage.JavaScriptPromptResult](webkit/webpage/javascriptpromptresult.md)
