Is it possible to somehow prohibit sites from using alerts.
So that pop-up windows do not appear?
Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
How disable alert?
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: How disable alert?
Hi,
See the CEF4Delphi/demos/JavaScript/JSDialog demo and use the TChromiumCore.OnJsdialog event to hide all JavaScript dialogs.
https://github.com/salvadordf/CEF4Delphi/blob/f0f4de8b3b5e69d0b9353a374093959712c56bb2/demos/Delphi_VCL/JavaScript/JSDialog/uJSDialogBrowser.pas#L181
Also use the TChromiumCore.OnBeforePopup event to block all popup windows.
https://github.com/salvadordf/CEF4Delphi/blob/f0f4de8b3b5e69d0b9353a374093959712c56bb2/demos/Delphi_VCL/JavaScript/JSDialog/uJSDialogBrowser.pas#L232
See the CEF4Delphi/demos/JavaScript/JSDialog demo and use the TChromiumCore.OnJsdialog event to hide all JavaScript dialogs.
https://github.com/salvadordf/CEF4Delphi/blob/f0f4de8b3b5e69d0b9353a374093959712c56bb2/demos/Delphi_VCL/JavaScript/JSDialog/uJSDialogBrowser.pas#L181
Also use the TChromiumCore.OnBeforePopup event to block all popup windows.
https://github.com/salvadordf/CEF4Delphi/blob/f0f4de8b3b5e69d0b9353a374093959712c56bb2/demos/Delphi_VCL/JavaScript/JSDialog/uJSDialogBrowser.pas#L232