WebArchive Class Reference
| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/WebKit.framework |
| Availability | Available in OS X v10.3.9 and later. |
| Companion guide | |
| Declared in | WebArchive.h |
Overview
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.
Instance Methods
data
Returns the data representation of the receiver.
Discussion
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.
Availability
- Available in OS X v10.3.9 and later.
Declared In
WebArchive.hinitWithData:
Initializes and returns the receiver, specifying the initial content data.
Discussion
Use the data method to get the receiver’s data.
Availability
- Available in OS X v10.3.9 and later.
Declared In
WebArchive.hinitWithMainResource:subresources:subframeArchives:
Initializes the receiver with a resource and optional subresources and subframe archives..
Discussion
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.
Availability
- Available in OS X v10.3.9 and later.
Declared In
WebArchive.hmainResource
Returns the receiver’s main resource.
Availability
- Available in OS X v10.3.9 and later.
Declared In
WebArchive.hsubframeArchives
Returns archives representing the receiver’s subresources or nil if there are none.
Availability
- Available in OS X v10.3.9 and later.
See Also
Declared In
WebArchive.hsubresources
Returns the receiver’s subresources, or nil if there are none.
Availability
- Available in OS X v10.3.9 and later.
See Also
Declared In
WebArchive.hConstants
WebArchivePboardType
The pasteboard type for this class.
extern NSString *WebArchivePboardType;
Constants
© 2009 Apple Inc. All Rights Reserved. (Last updated: 2009-04-08)