<!--
{
  "availability" : [
    "macOS: 10.3.0 - 10.14.0"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WebDocumentRepresentation/canProvideDocumentSource()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "c:objc(pl)WebDocumentRepresentation(im)canProvideDocumentSource"
  },
  "title" : "canProvideDocumentSource()"
}
-->

# canProvideDocumentSource()

Returns whether the receiver can provide content source.

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

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the receiver can provide source for the document content (for example, HTML source), <doc://com.apple.documentation/documentation/Swift/false> otherwise.

## Discussion

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

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)