---
title: "handleJavaScriptConfirm(message:initiatedBy:)"
framework: webkit
role: symbol
role_heading: Instance Method
path: "webkit/webpage/dialogpresenting/handlejavascriptconfirm(message:initiatedby:)"
---

# handleJavaScriptConfirm(message:initiatedBy:)

A JavaScript confirm() function has been invoked.

## Declaration

```swift
@MainActor func handleJavaScriptConfirm(message: String, initiatedBy frame: WebPage.FrameInfo) async -> WebPage.JavaScriptConfirmResult
```

## Parameters

- `message`: The message provided by JavaScript.
- `frame`: Information about the frame whose JavaScript process initiated this call.

## Return Value

Return Value The result of handling the invocation.
