# Class TCefJsDialogHandlerOwn

Description
Hierarchy
Methods

## Unit

uCEFJsDialogHandler

## Declaration

`type TCefJsDialogHandlerOwn = class(TCefBaseRefCountedOwn, ICefJsDialogHandler)`

## Description

This item has no description.

## Hierarchy

- TInterfacedObject
- TCefBaseRefCountedOwn
- TCefJsDialogHandlerOwn

## Overview

### Methods

Protected | `function OnJsdialog(const browser: ICefBrowser; const originUrl: ustring; dialogType: TCefJsDialogType; const messageText, defaultPromptText: ustring; const callback: ICefJsDialogCallback; out suppressMessage: Boolean): Boolean; virtual;`
Protected | `function OnBeforeUnloadDialog(const browser: ICefBrowser; const messageText: ustring; isReload: Boolean; const callback: ICefJsDialogCallback): Boolean; virtual;`
Protected | `procedure OnResetDialogState(const browser: ICefBrowser); virtual;`
Protected | `procedure OnDialogClosed(const browser: ICefBrowser); virtual;`
Protected | `procedure RemoveReferences; virtual;`
Public | `constructor Create; virtual;`

## Description

### Methods

Protected | `function OnJsdialog(const browser: ICefBrowser; const originUrl: ustring; dialogType: TCefJsDialogType; const messageText, defaultPromptText: ustring; const callback: ICefJsDialogCallback; out suppressMessage: Boolean): Boolean; virtual;`
This item has no description. Showing description inherited from ICefJsDialogHandler.OnJsdialog. Called to run a JavaScript dialog. If |origin_url| is non-NULL it can be passed to the CefFormatUrlForSecurityDisplay function to retrieve a secure and user-friendly display string. The |default_prompt_text| value will be specified for prompt dialogs only. Set |suppress_message| to true (1) and return false (0) to suppress the message (suppressing messages is preferable to immediately executing the callback as this is used to detect presumably malicious behavior like spamming alert messages in onbeforeunload). Set |suppress_message| to false (0) and return false (0) to use the default implementation (the default implementation will show one modal dialog at a time and suppress any additional dialog requests until the displayed dialog is dismissed). Return true (1) if the application will use a custom dialog or if the callback has been executed immediately. Custom dialogs may be either modal or modeless. If a custom dialog is used the application must execute |callback| once the custom dialog is dismissed.

Protected | `function OnBeforeUnloadDialog(const browser: ICefBrowser; const messageText: ustring; isReload: Boolean; const callback: ICefJsDialogCallback): Boolean; virtual;`
This item has no description. Showing description inherited from ICefJsDialogHandler.OnBeforeUnloadDialog. Called to run a dialog asking the user if they want to leave a page. Return false (0) to use the default dialog implementation. Return true (1) if the application will use a custom dialog or if the callback has been executed immediately. Custom dialogs may be either modal or modeless. If a custom dialog is used the application must execute |callback| once the custom dialog is dismissed.

Protected | `procedure OnResetDialogState(const browser: ICefBrowser); virtual;`
This item has no description. Showing description inherited from ICefJsDialogHandler.OnResetDialogState. Called to cancel any pending dialogs and reset any saved dialog state. Will be called due to events like page navigation irregardless of whether any dialogs are currently pending.

Protected | `procedure OnDialogClosed(const browser: ICefBrowser); virtual;`
This item has no description. Showing description inherited from ICefJsDialogHandler.OnDialogClosed. Called when the dialog is closed.

Protected | `procedure RemoveReferences; virtual;`
This item has no description. Showing description inherited from ICefJsDialogHandler.RemoveReferences. Custom procedure to clear all references.

Public | `constructor Create; virtual;`
This item has no description.

Generated by PasDoc 1.0.4.