Safari Developer Library

Developer

SafariReader Class Reference

Options
Deployment Target:

On This Page

SafariReader

Inheritance


Conforms To


Not Applicable

Import Statement


Not Applicable Not Applicable

Availability


Available in Safari 5.1 and later.

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.

  • available Property

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

    Declaration

    JavaScript

    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

    Available in Safari 5.1 and later.

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

    Declaration

    JavaScript

    void enter ();

    Availability

    Available in Safari 5.1 and later.

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

    Declaration

    JavaScript

    void exit ();

    Availability

    Available in Safari 5.1 and later.

  • tab Property

    The browser tab that contains the Reader view.

    Declaration

    JavaScript

    readonly attribute SafariBrowserTab tab

    Availability

    Available in Safari 5.1 and later.

  • visible Property

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

    Declaration

    JavaScript

    readonly attribute boolean visible

    Availability

    Available in Safari 5.1 and later.

  • Dispatches a message to the Reader view.

    Declaration

    JavaScript

    voiddispatchMessage (in DOMStringname, in anymessage);

    Parameters

    name

    The name of the message.

    message

    The body of the message. Optional.