Contents

handleJavaScriptPrompt(message:defaultText:initiatedBy:)

A JavaScript prompt() function has been invoked.

Declaration

@MainActor func handleJavaScriptPrompt(message: String, defaultText: String?, initiatedBy frame: WebPage.FrameInfo) async -> WebPage.JavaScriptPromptResult

Parameters

  • message:

    The message provided by JavaScript.

  • defaultText:

    The initial text provided by JavaScript, intended to be displayed in some text entry field.

  • frame:

    Information about the frame whose JavaScript process initiated this call.

Return Value

The result of handling the invocation; if the result is affirmative, the response will include some text returned to JavaScript.