| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/WebKit.framework |
| Availability | Available in Mac OS X v10.3.9 and later. |
| Companion guide | |
| Declared in | WebArchive.h |
A WebArchive object represents a webpage that can be archived—for example, archived on disk or on the pasteboard. A WebArchive object contains the main resource, as well as the subresources and subframes of the main resource. The main resource can be an entire webpage, a portion of a webpage, or some other kind of data such as an image. Use this class to archive webpages, or place a portion of a webpage on the pasteboard, or to represent rich web content in any application.
Returns the data representation of the receiver.
- (NSData *)data
The data returned can be used to save the web archive to a file, to put it on the pasteboard using the WebArchivePboardType type, or used to initialize another web archive using the initWithData: method.
WebArchive.hInitializes and returns the receiver, specifying the initial content data.
- (id)initWithData:(NSData *)data
Use the data method to get the receiver’s data.
WebArchive.hInitializes the receiver with a resource and optional subresources and subframe archives..
- (id)initWithMainResource:(WebResource *)mainResource subresources:(NSArray *)subresources subframeArchives:(NSArray *)subframeArchives
This method initializes and returns the receiver by setting the main resource to mainResource, and setting the subresources and subframe archives if supplied. The subresources argument should be an array of WebResource objects or nil if none are specified. The subframeArchives should be and array of WebArchive objects used by the subframes or nil if none are specified.
WebArchive.hReturns the receiver’s main resource.
- (WebResource *)mainResource
WebArchive.hReturns archives representing the receiver’s subresources or nil if there are none.
- (NSArray *)subframeArchives
WebArchive.hReturns the receiver’s subresources, or nil if there are none.
- (NSArray *)subresources
WebArchive.hThe pasteboard type for this class.
extern NSString *WebArchivePboardType;
Last updated: 2009-04-08