---
title: representation
framework: webkit
role: symbol
role_heading: Instance Property
path: webkit/webdatasource/representation
---

# representation

The data source’s representation depending on its MIME type.

## Declaration

```swift
var representation: (any WebDocumentRepresentation)! { get }
```

## Discussion

Discussion nil if the data source is in the process of being loaded and this method is invoked before loading is complete. You can specify the mapping between a representation and MIME type using the ``WebView/registerClass(_:representationClass:forMIMEType:)```WebView` class method.

## See Also

### Querying page data and state

- [data](webkit/webdatasource/data.md)
- [isLoading](webkit/webdatasource/isloading.md)
- [pageTitle](webkit/webdatasource/pagetitle.md)
- [textEncodingName](webkit/webdatasource/textencodingname.md)
