Table of Contents

Property PromptHandler

Namespace
DotNetBrowser.Browser.Dialogs
Assembly
DotNetBrowser.dll

PromptHandler

Gets or sets a handler that is used when JavaScript dialog prompting the user to input some text should be displayed.

IHandler<PromptParameters, PromptResponse> PromptHandler { get; set; }

Property Value

IHandler<PromptParameters, PromptResponse>

Remarks

The passed PromptParameters object contains the text of the prompt message and the default response text. You can use this information to display standard modal dialog to obtain a prompt response from user. Please note that it is not necessary to display a dialog in this callback.

Use the SubmitText(string) method to close the dialog and pass the text value passed as a parameter to the engine.

Use the Cancel() method to cancel the dialog.

If the callback throws an exception, the Cancel() method will be used.

Exceptions

ObjectDisposedException

The IBrowser has already been disposed.

ConnectionClosedException

The connection to the Chromium engine is closed.