In this example, we are setting the text of a <div> tag based on when we've started and finished an animation.
The Seadragon Ajax Library has an event subscription model where you can register callbacks to be notified when events fire. The key methods for event subscription are Seadragon.Viewer's addEventListener and removeEventListener. You can learn about them and all of the events on the
Seadragon.Viewer page in the reference documentation.