# 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)

*** ** * ** ***


```
public static class WebFeature
```

<br />

*** ** * ** ***

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

## Summary

| ### Constants |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/web/WebFeature#WEB_CONTENT()` Feature for `https://developer.android.com/reference/androidx/web/WebContent`. |

| ### Public fields |
|---|---|
| `static @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/web/WebFeature` | `https://developer.android.com/reference/androidx/web/WebFeature#INSTANCE()` |

| ### Public methods |
|---|---|
| `static final boolean` | `https://developer.android.com/reference/androidx/web/WebFeature#isFeatureSupported(kotlin.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html feature)` 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)

```
public static final @NonNull String WEB_CONTENT
```

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

## Public fields

### INSTANCE

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

```
public static @NonNull WebFeature INSTANCE
```

## Public methods

### isFeatureSupported

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

```
public static final boolean isFeatureSupported(@NonNull String feature)
```

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 |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html feature` | the feature to be checked Value is one of the following: - `WEB_CONTENT` - `WEB_SURFACE` <br /> |

| Returns |
|---|---|
| `boolean` | true if the feature is supported |