• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Class (BackForwardCacheSupportedFeatures)
2
3Implements a **BackForwardCacheSupportedFeatures** object to allow a page that uses any of the following features to enter the back-forward cache. For details about the sample code, see [enableBackForwardCache](./arkts-apis-webview-WebviewController.md#enablebackforwardcache12).
4
5> **NOTE**
6>
7> - The initial APIs of this module are supported since API version 9. Updates will be marked with a superscript to indicate their earliest API version.
8>
9> - The initial APIs of this class are supported since API version 12.
10>
11> - You can preview how this component looks on a real device, but not in DevEco Studio Previewer.
12
13## Attributes
14
15**System capability**: SystemCapability.Web.Webview.Core
16
17| Name| Type| Mandatory| Description|
18|------|------|------|------|
19| nativeEmbed<sup>12+</sup> | boolean | Yes| Whether to allow the page that uses same-layer rendering to enter the back-forward cache.<br>When the value is set to **true**, you need to maintain the lifecycle of system components created for the same-layer rendering elements to avoid resource leak.<br>The value **true** means to allow the page that uses same-layer rendering to enter the back-forward cache, and **false** means the opposite.<br>Default value: **false**.|
20| mediaTakeOver<sup>12+</sup> | boolean | Yes| Whether to allow a page using the media playback takeover feature to the back-forward cache.<br>When the value is set to **true**, you need to maintain the lifecycle of system components created for video elements to avoid resource leak.<br>The value **true** means to allow a page using the media playback takeover feature to enter the back-forward cache, and **false** means the opposite.<br>Default value: **false**.|
21
22## constructor<sup>12+</sup>
23
24constructor()
25
26Constructs a **BackForwardCacheSupportedFeatures** object.
27
28**System capability**: SystemCapability.Web.Webview.Core
29