CoreWebView2Settings.PreferredBackgroundTimerWakeInterval Property

Definition

public TimeSpan PreferredBackgroundTimerWakeInterval { get; set; }
member this.PreferredBackgroundTimerWakeInterval : TimeSpan with get, set
Public Property PreferredBackgroundTimerWakeInterval As TimeSpan

Property Value

Remarks

A WebView is in background state when its IsVisible property is FALSE. Intensive throttling is a substate of background state. For more details about intensive throttling, see Intensive throttling of Javascript timer wake ups.

A wake up interval is the amount of time that needs to pass before the WebView2 Runtime checks for new timer tasks to run.

The WebView2 Runtime will try to respect the preferred interval set by the application, but the effective value will be constrained by resource and platform limitations. Setting a value of 0 means a preference of 0 ms between timer wake ups. The default value is a constant determined by the running version of the WebView2 Runtime. Setting the value of this property will take effect immediately. All other background state policies (including intensive throttling) are effective independently of this setting.

For example, an application might use a background value of 100 ms to relax the default background value (usually 1000 ms). In this case, timers will run at most every 100 ms.

Applies to