1# Enums 2 3> **NOTE** 4> 5> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version. 6 7## WebHitTestType 8 9Enumerates the cursor node types for the [getLastHitTest](./arkts-apis-webview-WebviewController.md#getlasthittest18) API. 10 11**System capability**: SystemCapability.Web.Webview.Core 12 13| Name | Value| Description | 14| ------------- | -- |----------------------------------------- | 15| EditText | 0 |Editable area. | 16| Email | 1 |Email address. | 17| HttpAnchor | 2 |Hyperlink, where **src** is **http**. | 18| HttpAnchorImg | 3 |Image with a hyperlink, where **src** is http + HTML::img.| 19| Img | 4 |HTML::img tag. | 20| Map | 5 |Geographical address. | 21| Phone | 6 |Phone number. | 22| Unknown | 7 |Unknown content. | 23 24## SecureDnsMode<sup>10+</sup> 25 26Enumerates the modes in which the **Web** component uses HTTPDNS. 27 28**System capability**: SystemCapability.Web.Webview.Core 29 30| Name | Value| Description | 31| ------------- | -- |----------------------------------------- | 32| OFF | 0 |HTTPDNS is not used. This value can be used to revoke the previously used HTTPDNS configuration.| 33| AUTO | 1 |HTTPDNS is used in automatic mode. If the specified HTTPDNS server is unavailable for resolution, the component falls back to the system DNS server.| 34| SECURE_ONLY | 2 |The specified HTTPDNS server is forcibly used for DNS resolution.| 35 36## SecurityLevel<sup>11+</sup> 37 38Enumerates the security levels of the web page. 39 40**System capability**: SystemCapability.Web.Webview.Core 41 42| Name | Value| Description | 43| ------------- | -- |----------------------------------------- | 44| NONE | 0 |The web page is neither absolutely secure nor insecure, that is, neutral. A typical example is a web page whose URL scheme is not HTTP or HTTPS.| 45| SECURE | 1 |The web page is secure, using the HTTPS protocol and a trusted certificate.| 46| WARNING | 2 |The web page is insecure. A typical example is a web page that uses the HTTP or HTTPS protocol but an outdated TLS version.| 47| DANGEROUS | 3 |The web page is dangerous. This means that the page may have attempted to load HTTPS scripts to no avail, have failed authentication, or contain insecure active content in HTTPS, malware, phishing, or any other sources of major threats.| 48 49## MediaPlaybackState<sup>12+</sup> 50 51Enumerates the playback states on the current web page. 52 53**System capability**: SystemCapability.Web.Webview.Core 54 55| Name | Value | Description | 56| ------- | ---- | ------------------ | 57| NONE | 0 | No audio or video playback is started on the page.| 58| PLAYING | 1 | The audio and video on the page are being played.| 59| PAUSED | 2 | The audio and video on the page are paused. | 60| STOPPED | 3 | The audio and video on the page are stopped. | 61 62## PressureLevel<sup>14+</sup> 63 64Enumerates the memory pressure levels. When an application clears the cache occupied by the **Web** component, the **Web** kernel releases the cache based on the memory pressure level. 65 66**System capability**: SystemCapability.Web.Webview.Core 67 68| Name| Value| Description| 69| ------------------------------- | - | ---------- | 70| MEMORY_PRESSURE_LEVEL_MODERATE | 1 | Moderate memory pressure level. At this level, the **Web** kernel attempts to release the cache that has low reallocation overhead and does not need to be used immediately.| 71| MEMORY_PRESSURE_LEVEL_CRITICAL | 2 | Critical memory pressure level. At this level, the **Web** kernel attempts to release all possible memory caches.| 72 73## WebMessageType<sup>10+</sup> 74 75Enumerates the data types supported by the [webMessagePort](./arkts-apis-webview-WebMessagePort.md) API. 76 77**System capability**: SystemCapability.Web.Webview.Core 78 79| Name | Value| Description | 80| ------------ | -- |------------------------------- | 81| NOT_SUPPORT | 0 |Unsupported data type.| 82| STRING | 1 |String type.| 83| NUMBER | 2 |Number type.| 84| BOOLEAN | 3 |Boolean type.| 85| ARRAY_BUFFER | 4 |Raw binary data buffer.| 86| ARRAY | 5 |Array type.| 87| ERROR | 6 |Error object type.| 88 89## JsMessageType<sup>10+</sup> 90 91Enumerates the data types of the results returned after the [runJavaScriptExt](./arkts-apis-webview-WebviewController.md#runjavascriptext10) API is executed. 92 93**System capability**: SystemCapability.Web.Webview.Core 94 95| Name | Value| Description | 96| ------------ | -- |--------------------------------- | 97| NOT_SUPPORT | 0 |Unsupported data type.| 98| STRING | 1 |String type.| 99| NUMBER | 2 |Number type.| 100| BOOLEAN | 3 |Boolean type.| 101| ARRAY_BUFFER | 4 |Raw binary data buffer.| 102| ARRAY | 5 |Array type.| 103 104## RenderProcessMode<sup>12+</sup> 105 106Enumerates the ArkWeb render subprocess modes. 107 108**System capability**: SystemCapability.Web.Webview.Core 109 110| Name | Value| Description | 111| ------------- | -- |----------------------------------------- | 112| SINGLE | 0 |ArkWeb single render subprocess mode. In this mode, multiple **Web** components share one render subprocess.| 113| MULTIPLE | 1 |ArkWeb multi-render subprocess mode. In this mode, each **Web** component has a rendering subprocess.| 114 115## OfflineResourceType<sup>12+</sup> 116 117Enumerates the offline resource types corresponding to the [OfflineResourceMap](./arkts-apis-webview-i.md#offlineresourcemap12) object. 118 119**System capability**: SystemCapability.Web.Webview.Core 120 121| Name | Value| Description | 122| ------------ | -- |--------------------------------- | 123| IMAGE | 0 | Resource of the image type.| 124| CSS | 1 | Resource of the CSS type.| 125| CLASSIC_JS | 2 | Javascript resource loaded through the <script src="" /\> tag.| 126| MODULE_JS | 3 |Javascript resource loaded through the <script src="" type="module" /\> tag.| 127 128## ScrollType<sup>12+</sup> 129 130Enumerates the scroll types for [setScrollable](./arkts-apis-webview-WebviewController.md#setscrollable12). 131 132**System capability**: SystemCapability.Web.Webview.Core 133 134| Name | Value| Description | 135| ------------ | -- |--------------------------------- | 136| EVENT | 0 | Scrolling event, indicating that a web page is scrolled by using a touchscreen, a touchpad, or a mouse.| 137 138## WebDownloadState<sup>11+</sup> 139 140Enumerates the states of a download task. 141 142**System capability**: SystemCapability.Web.Webview.Core 143 144| Name | Value| Description | 145| ------------- | -- |----------------------------------------- | 146| IN_PROGRESS | 0 |The download task is in progress.| 147| COMPLETED | 1 |The download task is completed.| 148| CANCELED | 2 |The download task has been canceled.| 149| INTERRUPTED | 3 |The download task is interrupted.| 150| PENDING | 4 |The download task is pending.| 151| PAUSED | 5 |The download task is paused.| 152| UNKNOWN | 6 |The state of the download task is unknown.| 153 154## WebDownloadErrorCode<sup>11+</sup> 155 156Enumerates the download task error codes. 157 158**System capability**: SystemCapability.Web.Webview.Core 159 160| Name | Value| Description | 161| ------------- | -- |----------------------------------------- | 162| ERROR_UNKNOWN | 0 |Unknown error.| 163| FILE_FAILED | 1 | Failed to operate the file.| 164| FILE_ACCESS_DENIED | 2 | No permission to access the file.| 165| FILE_NO_SPACE | 3 | The disk space is insufficient.| 166| FILE_NAME_TOO_LONG | 5 | The file name is too long.| 167| FILE_TOO_LARGE | 6 | The file is too large.| 168| FILE_TRANSIENT_ERROR | 10 | Some temporary issues occur, such as insufficient memory, files in use, and too many files open at the same time.| 169| FILE_BLOCKED | 11 | Access to the file is blocked due to certain local policies.| 170| FILE_TOO_SHORT | 13 | The file to resume downloading is not long enough. It may not exist.| 171| FILE_HASH_MISMATCH | 14 | Hash mismatch.| 172| FILE_SAME_AS_SOURCE | 15 | The file already exists.| 173| NETWORK_FAILED | 20 | Common network error.| 174| NETWORK_TIMEOUT | 21 | Network connection timeout.| 175| NETWORK_DISCONNECTED | 22 | Network disconnected.| 176| NETWORK_SERVER_DOWN | 23 | The server is shut down.| 177| NETWORK_INVALID_REQUEST | 24 | Invalid network request. The request may be redirected to an unsupported scheme or an invalid URL.| 178| SERVER_FAILED | 30 | The server returns a general error.| 179| SERVER_NO_RANGE | 31 | The server does not support the range request.| 180| SERVER_BAD_CONTENT | 33 | The server does not have the requested data.| 181| SERVER_UNAUTHORIZED | 34 | The file cannot be downloaded from the server.| 182| SERVER_CERT_PROBLEM | 35 | The server certificate is incorrect.| 183| SERVER_FORBIDDEN | 36 | The access to the server is forbidden.| 184| SERVER_UNREACHABLE | 37 | The server cannot be accessed.| 185| SERVER_CONTENT_LENGTH_MISMATCH | 38 | The received data does not match the content length.| 186| SERVER_CROSS_ORIGIN_REDIRECT | 39 | An unexpected cross-site redirection occurs.| 187| USER_CANCELED | 40 | The user cancels the download.| 188| USER_SHUTDOWN | 41 | The user closes the application.| 189| CRASH | 50 | The application crashes.| 190 191## WebResourceType<sup>12+</sup> 192 193Enumerates the types of requested resources. 194 195**System capability**: SystemCapability.Web.Webview.Core 196 197| Name | Value| Description | 198| ------------ | -- |--------------------------------- | 199| MAIN_FRAME | 0 | Top-level page.| 200| SUB_FRAME | 1 | Frame or Iframe.| 201| STYLE_SHEET | 2 | CSS style sheet.| 202| SCRIPT | 3 | External script.| 203| IMAGE | 4 | Image (JPG, GIF, PNG, or other format).| 204| FONT_RESOURCE | 5 | Font.| 205| SUB_RESOURCE | 6 | Other sub-resource. If the type is unknown, it is used as the default type.| 206| OBJECT | 7 | Object (or embed) tag of the plug-in, or the resource requested by the plug-in.| 207| MEDIA | 8 | Media resource.| 208| WORKER | 9 | Main resource of a dedicated worker thread.| 209| SHARED_WORKER | 10 | Main resource of a shared worker thread.| 210| PREFETCH | 11 | Explicit prefetch request.| 211| FAVICON | 12 | Website icon.| 212| XHR | 13 | XMLHttpRequest.| 213| PING | 14 | <a ping\>/sendBeacon ping request.| 214| SERVICE_WORKER | 15 | Main resource of a service worker.| 215| CSP_REPORT | 16 | Report of Content Security Policy violation.| 216| PLUGIN_RESOURCE | 17 | Resource requested by the plug-in.| 217| NAVIGATION_PRELOAD_MAIN_FRAME | 19 | Main frame redirection request that triggers service worker preloading.| 218| NAVIGATION_PRELOAD_SUB_FRAME | 20 | Subframe redirection request that triggers service worker preloading.| 219 220## PlaybackStatus<sup>12+</sup> 221 222Enumerates the playback statuses of the player, which is an input parameter of the [handleStatusChanged](./arkts-apis-webview-NativeMediaPlayerHandler.md#handlestatuschanged12) API. 223 224**System capability**: SystemCapability.Web.Webview.Core 225 226| Name| Value| Description| 227|------|----|------| 228| PAUSED | 0 | Playing.| 229| PLAYING | 1 | Paused.| 230 231## NetworkState<sup>12+<sup> 232 233Enumerates the network statuses of the player. 234 235**System capability**: SystemCapability.Web.Webview.Core 236 237| Name| Value| Description| 238|------|----|------| 239| EMPTY | 0 | The player has not started downloading data.| 240| IDLE | 1 | The player's network activity is idle. This could mean that the download of a media segment is complete, and the player is waiting to start downloading the next segment.| 241| LOADING | 2 | The player is downloading media data.| 242| NETWORK_ERROR | 3 | A network error occurs.| 243 244## ReadyState<sup>12+<sup> 245 246Enumerates the cache states of the player. 247 248**System capability**: SystemCapability.Web.Webview.Core 249 250| Name| Value| Description| 251|------|----|------| 252| HAVE_NOTHING | 0 | There is no data cached.| 253| HAVE_METADATA | 1 | Only media metadata is cached.| 254| HAVE_CURRENT_DATA | 2 | Data up to the current playback position is cached.| 255| HAVE_FUTURE_DATA | 3 | Data beyond the current playback position is cached, but there might still be stutters during playback.| 256| HAVE_ENOUGH_DATA | 4 | Sufficient data has been cached to ensure smooth playback.| 257 258## MediaError<sup>12+<sup> 259 260Enumerates the error types of the player. 261 262**System capability**: SystemCapability.Web.Webview.Core 263 264| Name| Value| Description| 265|------|----|------| 266| NETWORK_ERROR | 1 | Network error.| 267| FORMAT_ERROR | 2 | Media format error.| 268| DECODE_ERROR | 3 | Decoding error.| 269 270## SuspendType<sup>12+<sup> 271 272Enumerates the suspension types of the player. 273 274**System capability**: SystemCapability.Web.Webview.Core 275 276| Name| Value| Description| 277|------|----|------| 278| ENTER_BACK_FORWARD_CACHE | 0 | The page enters the BFCache.| 279| ENTER_BACKGROUND | 1 | The page is displayed in the background.| 280| AUTO_CLEANUP | 2 | The page is automatically cleaned up by the system.| 281 282## MediaType<sup>12+<sup> 283 284Enumerates the media types. 285 286**System capability**: SystemCapability.Web.Webview.Core 287 288| Name| Value| Description| 289|------|----|------| 290| VIDEO | 0 | Video.| 291| AUDIO | 1 | Audio.| 292 293## SourceType<sup>12+<sup> 294 295Enumerates the media source types. 296 297**System capability**: SystemCapability.Web.Webview.Core 298 299| Name| Value| Description| 300|------|----|------| 301| URL | 0 | URL.| 302| MSE | 1 | Blob.| 303 304## Preload<sup>12+<sup> 305 306Enumerates how the player preloads media data. 307 308**System capability**: SystemCapability.Web.Webview.Core 309 310| Name| Value| Description| 311|------|----|------| 312| NONE | 0 | No media data is preloaded.| 313| METADATA | 1 | Only the metadata of the media is preloaded.| 314| AUTO | 2 | A sufficient amount of media data is preloaded to ensure smooth playback| 315 316## ProxySchemeFilter<sup>15+</sup> 317 318Enumerates the schemes that use the proxy. 319 320**System capability**: SystemCapability.Web.Webview.Core 321 322| Name | Value| Description | 323| ------------- | -- |----------------------------------------- | 324| MATCH_ALL_SCHEMES | 0 |All schemes use proxies.| 325| MATCH_HTTP | 1 |HTTP requests use proxies.| 326| MATCH_HTTPS | 2 |HTTPS requests use proxies.| 327 328## WebDestroyMode<sup>20+</sup> 329 330Enumerates the destroy modes of the **Web** component. When the Web component is destroyed, the destroy mode affects the resource release time of the Web kernel, such as the JavaScript running context and rendering context. 331 332**System capability**: SystemCapability.Web.Webview.Core 333 334| Name| Value| Description| 335| ------------------------------- | - | ---------- | 336| NORMAL_MODE | 0 | Normal mode. The system determines the destroy time of **Web** component resources.| 337| FAST_MODE | 1 | Quick mode. When the **Web** component is destroyed, the related internal resources are destroyed immediately.| 338 339## WebBlanklessErrorCode<sup>20+</sup> 340 341Enumerates the error codes of the blankless loading. 342 343**System capability**: SystemCapability.Web.Webview.Core 344 345| Name| Value| Description| 346| ------------------------------- | - | ---------- | 347| SUCCESS | 0 | Operation successful.| 348| ERR_UNKNOWN | -1 | Unknown error or internal status error.| 349| ERR_INVALID_PARAM | -2 | Invalid parameter.| 350| ERR_CONTROLLER_NOT_INITED | -3 | **WebViewController** is not bound to any component.| 351| ERR_KEY_NOT_MATCH | -4 | No key value is matched. [setBlanklessLoadingWithKey](./arkts-apis-webview-WebviewController.md#setblanklessloadingwithkey20) must be used with [getBlanklessInfoWithKey](./arkts-apis-webview-WebviewController.md#getblanklessinfowithkey20) and their key values must be the same. Otherwise, this error code is returned.| 352| ERR_SIGNIFICANT_CHANGE | -5 | The similarity is low, and the system determines that the scene change is too large. As a result, the [setBlanklessLoadingWithKey](./arkts-apis-webview-WebviewController.md#setblanklessloadingwithkey20) API does not enable frame interpolation.| 353