Share via


interface ICoreWebView2ExperimentalSettings9

Note

This reference is no longer being maintained. For the latest API reference, see WebView2 API Reference.

Note

This an experimental API that is shipped with our prerelease SDK. See WebView2 release notes.

interface ICoreWebView2ExperimentalSettings9
  : public IUnknown

A continuation of the ICoreWebView2Settings interface to support timer wake intervals.

Summary

Members Descriptions
get_PreferredBackgroundTimerWakeIntervalInMilliseconds Gets the PreferredBackgroundTimerWakeIntervalInMilliseconds property.
get_PreferredForegroundTimerWakeIntervalInMilliseconds Gets the PreferredForegroundTimerWakeIntervalInMilliseconds property.
get_PreferredIntensiveTimerWakeIntervalInMilliseconds Gets the PreferredIntensiveTimerWakeIntervalInMilliseconds property.
get_PreferredOverrideTimerWakeIntervalInMilliseconds Gets the PreferredOverrideTimerWakeIntervalInMilliseconds property.
put_PreferredBackgroundTimerWakeIntervalInMilliseconds The preferred timer wake up interval (in milliseconds) to use for timer tasks in script (setTimeout and setInterval), when the WebView is in background state, with no intensive throttling.
put_PreferredForegroundTimerWakeIntervalInMilliseconds The preferred timer wake up interval (in milliseconds) to use for timer tasks in script (setTimeout and setInterval), when the WebView is in foreground state.
put_PreferredIntensiveTimerWakeIntervalInMilliseconds The preferred timer wake up interval (in milliseconds) to use for timer tasks in script (setTimeout and setInterval), when the WebView is in background state with intensive throttling.
put_PreferredOverrideTimerWakeIntervalInMilliseconds The preferred timer wake up interval (in milliseconds) to use for timer tasks in script (setTimeout and setInterval), in frames whose UseOverrideTimerWakeInterval property is set to TRUE, regardless of whether they are in foreground or background state.

Applies to

Product Introduced
WebView2 Win32 N/A
WebView2 Win32 Prerelease 1.0.2730

Members

get_PreferredBackgroundTimerWakeIntervalInMilliseconds

Gets the PreferredBackgroundTimerWakeIntervalInMilliseconds property.

public HRESULT get_PreferredBackgroundTimerWakeIntervalInMilliseconds(INT32 * value)

get_PreferredForegroundTimerWakeIntervalInMilliseconds

Gets the PreferredForegroundTimerWakeIntervalInMilliseconds property.

public HRESULT get_PreferredForegroundTimerWakeIntervalInMilliseconds(INT32 * value)

get_PreferredIntensiveTimerWakeIntervalInMilliseconds

Gets the PreferredIntensiveTimerWakeIntervalInMilliseconds property.

public HRESULT get_PreferredIntensiveTimerWakeIntervalInMilliseconds(INT32 * value)

get_PreferredOverrideTimerWakeIntervalInMilliseconds

Gets the PreferredOverrideTimerWakeIntervalInMilliseconds property.

public HRESULT get_PreferredOverrideTimerWakeIntervalInMilliseconds(INT32 * value)

put_PreferredBackgroundTimerWakeIntervalInMilliseconds

The preferred timer wake up interval (in milliseconds) to use for timer tasks in script (setTimeout and setInterval), when the WebView is in background state, with no intensive throttling.

public HRESULT put_PreferredBackgroundTimerWakeIntervalInMilliseconds(INT32 value)

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.

put_PreferredForegroundTimerWakeIntervalInMilliseconds

The preferred timer wake up interval (in milliseconds) to use for timer tasks in script (setTimeout and setInterval), when the WebView is in foreground state.

public HRESULT put_PreferredForegroundTimerWakeIntervalInMilliseconds(INT32 value)

A WebView is in foreground state when its IsVisible property is TRUE. This aligns to the Chromium concept of foreground, which means programmatically visible, even if occluded. For more details, see Page Visibility API.

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.

For example, an application might use a foreground value of 30 ms for moderate throttling scenarios. In this case, timers will run at most every 30 ms. Or the application could get and match the default background value (usually 1000 ms).

put_PreferredIntensiveTimerWakeIntervalInMilliseconds

The preferred timer wake up interval (in milliseconds) to use for timer tasks in script (setTimeout and setInterval), when the WebView is in background state with intensive throttling.

public HRESULT put_PreferredIntensiveTimerWakeIntervalInMilliseconds(INT32 value)

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.

put_PreferredOverrideTimerWakeIntervalInMilliseconds

The preferred timer wake up interval (in milliseconds) to use for timer tasks in script (setTimeout and setInterval), in frames whose UseOverrideTimerWakeInterval property is set to TRUE, regardless of whether they are in foreground or background state.

public HRESULT put_PreferredOverrideTimerWakeIntervalInMilliseconds(INT32 value)

This is a category specific to WebView2 with no corresponding state in the Chromium tab state model.

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.

For example, an application might use an override timer wake interval of 30 ms to reduce resource consumption from third party frames in the WebView. In this case, timers will run at most every 30 ms.