Edit

Share via


WebView.LongRunningScriptDetected Event

Definition

Occurs periodically while the IWebView 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 subsequent IWebView navigation.

Applies to

See also