| Conforms to | |
| Framework | /System/Library/Frameworks/WebKit.framework |
| Availability | Available in Mac OS X v10.2 with Safari 1.0 and later.
Available in Mac OS X v10.2.7 and later.
|
| Companion guide | |
| Declared in | WebDocument.h |
This protocol is adopted by document representation classes that handle specific MIME types. You can implement your own document view classes and document representation classes to render data for specific MIME types, and register those classes using the WebFrame registerViewClass:representationClass:forMIMEType: method.
Returns whether the receiver can provide content source.
- (BOOL)canProvideDocumentSource
This method returns YES if the receiver can provide source for the document content (for example, HTML source), NO otherwise.
WebDocument.hReturns the receiver’s source as text.
- (NSString *)documentSource
For example, for HTML documents, returns the HTML source.
WebDocument.hInvoked when a data source finishes loading its content.
- (void)finishedLoadingWithDataSource:(WebDataSource *)dataSource
WebDocument.hInvoked when a data source has received some data.
- (void)receivedData:(NSData *)data withDataSource:(WebDataSource *)dataSource
Data is loaded incrementally so this method may be invoked multiple times.
WebDocument.hInvoked when a data source receives an error loading its content.
- (void)receivedError:(NSError *)error withDataSource:(WebDataSource *)dataSource
The error argument contains details on the error that occurred.
WebDocument.hSets the receiver’s data source.
- (void)setDataSource:(WebDataSource *)dataSource
This method is invoked soon after the document representation is created.
WebDocument.hReturns the receiver’s document title.
- (NSString *)title
WebDocument.h
Last updated: 2006-05-23