onNavigate

open fun onNavigate(listener: (href: String) -> Unit): () -> Unit(source)

Calls listener when a script asks to go somewhere: it set location, called open, or clicked a link itself. A place in the book comes as a zip path with its fragment, as EpubLink.href gives one, and anything else as written. Returns a function that stops the listening.