---
title: canProvideDocumentSource()
framework: webkit
role: symbol
role_heading: Instance Method
path: webkit/webdocumentrepresentation/canprovidedocumentsource()
---

# canProvideDocumentSource()

Returns whether the receiver can provide content source.

## Declaration

```swift
func canProvideDocumentSource() -> Bool
```

## Return Value

Return Value true if the receiver can provide source for the document content (for example, HTML source), false otherwise.

## Discussion

Discussion The receiver should return true only if it makes sense for someone to view the source of the document in question. For example, a web view returns false if the content is an image, was produced by a plug-in, or contains text content already.

## See Also

### Getting document source

- [documentSource()](webkit/webdocumentrepresentation/documentsource().md)
