# PageState

Artifact: [androidx.webkit:webkit](https://developer.android.com/jetpack/androidx/releases/webkit) [View Source](https://cs.android.com/search?q=file:androidx/webkit/PageState.java+class:androidx.webkit.PageState) Added in [1.19.0-alpha01](https://developer.android.com/jetpack/androidx/releases/webkit#1.19.0-alpha01)

*** ** * ** ***


```
@AnyThread
public final class PageState
```

<br />

*** ** * ** ***

This class serves as an immutable snapshot of a `https://developer.android.com/reference/androidx/webkit/Page` instance at a certain point in time, captured every time a callback (e.g. `https://developer.android.com/reference/androidx/webkit/NavigationListener#onPageLoadEvent(androidx.webkit.Page)`) is called.

Note: Do not use `https://developer.android.com/reference/androidx/webkit/PageState` as a key to connect callbacks, use `https://developer.android.com/reference/androidx/webkit/Page` instead from `https://developer.android.com/reference/androidx/webkit/PageState#getPage()`

## Summary

| ### Public methods |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/webkit/Page` | `https://developer.android.com/reference/androidx/webkit/PageState#getPage()()` Returns the page linked to this PageState snapshot |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/webkit/PageState#getUrl()()` Returns the URL associated with this PageState instance. |

## Public methods

### getPage

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

```
public @NonNull Page getPage()
```

Returns the page linked to this PageState snapshot

### getUrl

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

```
public @NonNull String getUrl()
```

Returns the URL associated with this PageState instance.