Class Ring

Circular chain of websites.

Properties

Accessors

Methods

Properties

current: Site

Site of the page, on which the library is used.

first: Site

First memeber of the ring.

last: Site

Last member of the ring.

Accessors

  • get random(): Site
  • Random member of the ring. Guaranteed to not be the same as the current.

    Returns Site

Methods

  • Iterates over actual members of the ring.

    Returns Generator<Site, void, unknown>

  • Does Site#install for the links with the following DOM IDs:

    • lwr-first
    • lwr-current
    • lwr-last
    • lwr-random
    • lwr-prev
    • lwr-next

    Returns void

  • Creates a ring from a remote JSON file.

    Parameters

    • url: string

      URL of the JSON file.

    • Optional hint: string

      URL of the page, on which the library is used.

    Returns Promise<Ring>

    A ring object.

    Throws

    TypeError If the ring is malformed.

Generated using TypeDoc