The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
Optionaloptions: boolean | AddEventListenerOptionsWhether a point of the graph has an animation. The points are read again unless the animation is running or paused.
The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with dispatchEvent().
Stops the animation and forgets the points that were animated, to let go of what the animation holds. The graph calls it when it is taken out of the page. start and canBeAnimated read the points again.
Whether the animation is stopped by pause.
Whether the animation is playing.
Stop calling a handler given to on.
the animation, to chain.
Call handler when the animation sends event. The same handler given twice is called once.
the animation, to chain.
Forgets the animations of the points that were removed from the graph, and of the points that end at a removed point. If nothing is left to play, a running animation stops.
Stops it where it is, to go on with start. Does nothing unless the animation runs.
The removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target. The event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see Matching event listeners for removal.
Optionaloptions: boolean | EventListenerOptionsStarts again from the beginning, whether it runs, is paused or is over.
Starts the animation from the beginning. After a pause it goes on from where it was, and while it runs it does nothing (see restart). The points are read again when it starts from the beginning.
Stops the animation, and puts the points back where the code says (after a short delay, once the last frame is drawn). Does nothing
to an animation that is over, except putting the points back. The event stop is sent only if the animation ran or was paused.
Plays the animation of the points of a graph (the option
animate): each point goes from the pointfromto the pointto, and the figures built on it follow. It is made with the graph,new Animate(graph), and attaches itself to it; a graph has one. The program calls the methods below, and a page that shows buttons listens to the events (on).The events are
start(the animation began, or went on after a pause),pause,end(every animation reached its end, and none loops) andstop.