WebHistoryItem Class Reference
| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/WebKit.framework |
| Availability | Available in OS X v10.2 with Safari 1.0 and later. Available in OS X v10.2.7 and later. |
| Companion guide | |
| Declared in | WebHistoryItem.h |
Overview
WebHistoryItem objects encapsulate information about visiting a page so that users can return to that page. WebHistory and WebBackForwardList objects manage lists of WebHistoryItem objects. WebHistoryItem objects are created and added to these lists automatically when loading pages, so you do not need to create WebHistoryItem objects directly.
Adopted Protocols
Tasks
Initializing WebHistoryItem Objects
Getting URL Information
Getting and Setting Page Titles
Getting Other Attributes
Instance Methods
alternateTitle
Returns an alternate title that may be used in place of the receiver’s page title.
Discussion
This method returns nil if no alternate title exists.
Availability
- Available in OS X v10.2 with Safari 1.0 and later.
- Available in OS X v10.2.7 and later.
See Also
Declared In
WebHistoryItem.hicon
Returns the icon for the receiver’s page, or nil if none exists.
Availability
- Available in OS X v10.2 with Safari 1.0 and later.
- Available in OS X v10.2.7 and later.
Declared In
WebHistoryItem.hinitWithURLString:title:lastVisitedTimeInterval:
Initializes the receiver with a URL,URLString, a title specified by title and the last time this item was visited specified by time title, and time last visited.
Discussion
WebKit normally creates WebHistoryItem objects for you but on occasion you might want to create an item and add it to the WebBackForwardList yourself. Note that when an instance is first initialized the strings returned by URLString and originalURLString are the same.
Availability
- Available in OS X v10.2 with Safari 1.0 and later.
- Available in OS X v10.2.7 and later.
Declared In
WebHistoryItem.hlastVisitedTimeInterval
Returns the last time and date the receiver’s page was visited.
Discussion
The interval is from a reference date as determined by NSDate.
Availability
- Available in OS X v10.2 with Safari 1.0 and later.
- Available in OS X v10.2.7 and later.
Declared In
WebHistoryItem.horiginalURLString
Returns the string representation of the original URL for the receiver’s page.
Availability
- Available in OS X v10.2 with Safari 1.0 and later.
- Available in OS X v10.2.7 and later.
See Also
Declared In
WebHistoryItem.hsetAlternateTitle:
Sets an alternate title for a page.
Discussion
This is used as a convenience to display or store short versions of the page title.
Availability
- Available in OS X v10.2 with Safari 1.0 and later.
- Available in OS X v10.2.7 and later.
See Also
Declared In
WebHistoryItem.htitle
Returns the receiver’s original page title.
Discussion
The title returned comes from the title HTML tag for HTML documents.
Availability
- Available in OS X v10.2 with Safari 1.0 and later.
- Available in OS X v10.2.7 and later.
See Also
Declared In
WebHistoryItem.hURLString
Returns the string representation of the URL for the receiver’s page.
Discussion
This URL may differ from the original URL if the page was, for example, redirected to a new location.
Availability
- Available in OS X v10.2 with Safari 1.0 and later.
- Available in OS X v10.2.7 and later.
See Also
Declared In
WebHistoryItem.hNotifications
WebHistoryItemChangedNotification
This notification does not contain a userInfo dictionary.
Availability
- Available in OS X v10.2 with Safari 1.0 and later.
- Available in OS X v10.2.7 and later.
See Also
Declared In
WebHistoryItem.h© 2008 Apple Inc. All Rights Reserved. (Last updated: 2008-10-15)