Chime

com.alecdorrington.laminarcomponents.Chime
final class Chime(key: String)

A short chime for something arriving, two soft notes made on the spot. A page may make sound only once someone has pressed a key or clicked on it, so it is silent until then (listen); it chimes at most once in a while, and for any one arrival, only in one of the reader's tabs.

Value parameters

key

The key in local storage under which the reader's tabs agree which of them chimes.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def listen(): Unit

Readies the sound at someone's first click or key press, which a page must wait for. Call it as the page starts.

Readies the sound at someone's first click or key press, which a page must wait for. Call it as the page starts.

Attributes

def play(arrival: Long): Unit

Chimes for an arrival, unless it chimed a moment ago or another tab has already chimed for it.

Chimes for an arrival, unless it chimed a moment ago or another tab has already chimed for it.

Value parameters

arrival

What arrived, greater for each later arrival, as an id is, so that the tabs hearing of it agree which chimes.

Attributes