# WebFeature

Artifact: [androidx.web:web](https://developer.android.com/jetpack/androidx/releases/web) [View Source](https://cs.android.com/search?q=file:androidx/web/WebFeature.kt+class:androidx.web.WebFeature) Added in [1.0.0-alpha01](https://developer.android.com/jetpack/androidx/releases/web#1.0.0-alpha01)

*** ** * ** ***


```
object WebFeature
```

<br />

*** ** * ** ***

Utility class for checking which Web features are supported on the device.

## Summary

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/web/WebFeature#WEB_CONTENT()` Feature for `https://developer.android.com/reference/kotlin/androidx/web/WebContent`. |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/web/WebFeature#isFeatureSupported(kotlin.String)(feature: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Return whether a feature is supported at runtime. |

## Constants

### WEB_CONTENT

Added in [1.0.0-alpha01](https://developer.android.com/jetpack/androidx/releases/web#1.0.0-alpha01)

```
const val WEB_CONTENT: String
```

Feature for `https://developer.android.com/reference/kotlin/androidx/web/WebContent`.

## Public functions

### isFeatureSupported

Added in [1.0.0-alpha01](https://developer.android.com/jetpack/androidx/releases/web#1.0.0-alpha01)

```
fun isFeatureSupported(feature: String): Boolean
```

Return whether a feature is supported at runtime. On devices where this is not supported, an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unsupported-operation-exception/index.html` will be thrown.

| Parameters |
|---|---|
| `feature: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | the feature to be checked Value is one of the following: - `WEB_CONTENT` - `WEB_SURFACE` <br /> |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | true if the feature is supported |