iOS reference / WebKit / WebPage.DialogPresentingWebKit · IOS API REFERENCE
WebPage.DialogPresenting protocol · iOS 26.0+ · SDK 27.1
protocol DialogPresentingAllows providing custom behavior to handle JavaScript actions and provide a response.
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.
Members (4) method · iOS 26.0+ handleFileInputPrompt Swift declaration @MainActor func handleFileInputPrompt(parameters: WKOpenPanelParameters, initiatedBy frame: WebPage.FrameInfo) async -> WebPage.FileInputPromptResultBy default, this method immediately returns with a result of `.cancel`.
method · iOS 26.0+ handleJavaScriptAlert Swift declaration @MainActor func handleJavaScriptAlert(message: String, initiatedBy frame: WebPage.FrameInfo) asyncBy default, this method immediately returns.
method · iOS 26.0+ handleJavaScriptPrompt Swift declaration @MainActor func handleJavaScriptPrompt(message: String, defaultText: String?, initiatedBy frame: WebPage.FrameInfo) async -> WebPage.JavaScriptPromptResultBy default, this method immediately returns with a result of `.cancel`.
method · iOS 26.0+ handleJavaScriptConfirm Swift declaration @MainActor func handleJavaScriptConfirm(message: String, initiatedBy frame: WebPage.FrameInfo) async -> WebPage.JavaScriptConfirmResultBy default, this method immediately returns with a result of `.cancel`.
Skipped declarations No declarations were skipped in this snapshot.
All WebKit types →