Skip to content

OnWindowCloseRequested - cWebView2Browser

Sent when the page requests to close the window

Type: Event

Syntax

Procedure OnWindowCloseRequested

Description

This message is sent when the page requests to close the window.

Usually this happens when window.close() is called from JavaScript.

Implement this message, for example, when you have implemented custom popups by handling OnNewWindowRequested.