WebViewLongRunningScriptDetectedEventArgs WebViewLongRunningScriptDetectedEventArgs WebViewLongRunningScriptDetectedEventArgs WebViewLongRunningScriptDetectedEventArgs Class

Definition

Provides data for the WebView.LongRunningScriptDetected event.

public : sealed class WebViewLongRunningScriptDetectedEventArgs : IWebViewLongRunningScriptDetectedEventArgs
public sealed class WebViewLongRunningScriptDetectedEventArgs : IWebViewLongRunningScriptDetectedEventArgs
Public NotInheritable Class WebViewLongRunningScriptDetectedEventArgs Implements IWebViewLongRunningScriptDetectedEventArgs
// This class does not provide a public constructor.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Properties

ExecutionTime ExecutionTime ExecutionTime ExecutionTime

Gets the number of milliseconds that the WebView control has been executing a long-running script.

public : TimeSpan ExecutionTime { get; }
public TimeSpan ExecutionTime { get; }
Public ReadOnly Property ExecutionTime As TimeSpan
var timeSpan = webViewLongRunningScriptDetectedEventArgs.executionTime;
Value
TimeSpan TimeSpan TimeSpan TimeSpan

The number of milliseconds the script has been running.

Remarks

If the script is still running after 5 seconds, the app will hang. To halt the script, set the StopPageScriptExecution property to true. The halted script will not resume for the lifetime of the WebView.

StopPageScriptExecution StopPageScriptExecution StopPageScriptExecution StopPageScriptExecution

Halts a long-running script executing in a WebView control.

public : Platform::Boolean StopPageScriptExecution { get; set; }
public bool StopPageScriptExecution { get; set; }
Public ReadWrite Property StopPageScriptExecution As bool
var bool = webViewLongRunningScriptDetectedEventArgs.stopPageScriptExecution;
webViewLongRunningScriptDetectedEventArgs.stopPageScriptExecution = bool;
Value
Platform::Boolean bool bool bool

true to halt the script; otherwise, false.

Remarks

The halted script will not resume for the lifetime of the WebView. If the script is still running after 5 seconds, the app will hang. To determine how long the script has been running, check the ExecutionTime property.