<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: -",
    "macOS: 26.0.0 -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WebPage/JavaScriptPromptResult",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "s:6WebKit0A4PageC22JavaScriptPromptResultO"
  },
  "title" : "WebPage.JavaScriptPromptResult"
}
-->

# WebPage.JavaScriptPromptResult

The result of handling a JavaScript confirm invocation.

```
enum JavaScriptPromptResult
```

## Topics

### Enumeration Cases

[`case cancel`](/documentation/WebKit/WebPage/JavaScriptPromptResult/cancel)

Signals a negative action was produced by the invocation.

[`case ok(String)`](/documentation/WebKit/WebPage/JavaScriptPromptResult/ok(_:))

Signals an affirmative action was produced by the invocation with the specified text.

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Hashable`](/documentation/Swift/Hashable)

[`Sendable`](/documentation/Swift/Sendable)

[`Equatable`](/documentation/Swift/Equatable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)