SafariReader Class Reference

Inherits from
Technology area
Safari Extensions
Availability
Available in Safari 5.1 and later.

Overview

Reader is a Safari feature that allows users to read online articles in a continuous, clutter-free view, with no ads or visual distractions. Reader concatenates multipage articles into a single scrolling pane.

Instances of the SafariReader class represent the Reader view.

Tasks

Working with the Reader View

Dispatching Messages

Properties

available

A Boolean value that indicates whether the tab can display the Reader view.

readonly attribute boolean available
Discussion

When the Reader view becomes available, a SafariAvailableEvent event is sent. If you need to know when the Reader view becomes available, listen for that event rather than polling this property.

Availability

tab

The browser tab that contains the Reader view.

readonly attribute SafariBrowserTab tab
Availability

visible

A Boolean value that indicates whether the Reader view is being displayed.

readonly attribute boolean visible
Availability

Methods

dispatchMessage

Dispatches a message to the Reader view.

void dispatchMessage (in DOMString name, in any message);
Parameters
name

The name of the message.

message

The body of the message. Optional.

enter

Enters the Reader view if it is available; otherwise does nothing.

void enter ();
Availability
  • Available in Safari 5.1 and later.

exit

Exits the Reader if it is visible; otherwise does nothing.

void exit ();
Availability
  • Available in Safari 5.1 and later.