WebView.LongRunningScriptDetected Event
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Occurs periodically while the WebView executes JavaScript, letting you halt the script.
public event EventHandler<Microsoft.Toolkit.Win32.UI.Controls.Interop.WinRT.WebViewControlLongRunningScriptDetectedEventArgs> LongRunningScriptDetected;
member this.LongRunningScriptDetected : EventHandler<Microsoft.Toolkit.Win32.UI.Controls.Interop.WinRT.WebViewControlLongRunningScriptDetectedEventArgs>
Public Event LongRunningScriptDetected As EventHandler(Of WebViewControlLongRunningScriptDetectedEventArgs)
Event Type
Implements
Remarks
Your app might appear unresponsive while scripts are running. This event provides an opportunity to interrupt a long-running script. To determine how long the script has been running, check the ExecutionTime property of the WebViewControlLongRunningScriptDetectedEventArgs object. To halt the script, set the event args StopPageScriptExecution property to true. The halted script will not execute again unless it is reloaded during a subseqent WebView navigation.