Click or drag to resize
CfxOnJsDialogEventArgs Class

[This is preliminary documentation and is subject to change.]

Called to run a JavaScript dialog. If |OriginUrl| is non-NULL it can be passed to the CfxFormatUrlForSecurityDisplay function to retrieve a secure and user-friendly display string. The |DefaultPromptText| value will be specified for prompt dialogs only. Set |SuppressMessage| 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 |SuppressMessage| 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.
Inheritance Hierarchy
SystemObject
  SystemEventArgs
    ChromiumCfxEventArgs
      Chromium.EventCfxOnJsDialogEventArgs

Namespace: Chromium.Event
Assembly: ChromiumFX (in ChromiumFX.dll)
Syntax
public class CfxOnJsDialogEventArgs : CfxEventArgs

The CfxOnJsDialogEventArgs type exposes the following members.

Properties
  NameDescription
Public propertyBrowser
Get the Browser parameter for the OnJsDialog callback.
Public propertyCallback
Get the Callback parameter for the OnJsDialog callback.
Public propertyDefaultPromptText
Get the DefaultPromptText parameter for the OnJsDialog callback.
Public propertyDialogType
Get the DialogType parameter for the OnJsDialog callback.
Public propertyMessageText
Get the MessageText parameter for the OnJsDialog callback.
Public propertyOriginUrl
Get the OriginUrl parameter for the OnJsDialog callback.
Public propertySuppressMessage
Set the SuppressMessage out parameter for the OnJsDialog callback.
Top
Methods
  NameDescription
Public methodSetReturnValue
Set the return value for the OnJsDialog callback. Calling SetReturnValue() more then once per callback or from different event handlers will cause an exception to be thrown.
Top
Remarks
See also the original CEF documentation in cef/include/capi/cef_jsdialog_handler_capi.h.
See Also