Skip to content

Latest commit

 

History

History
203 lines (119 loc) · 3.72 KB

DOCS.md

File metadata and controls

203 lines (119 loc) · 3.72 KB

DOCS


Classes and their tests





TOP



Handlers

Handler function define user interactions. They will:

  • read user input from events and from the DOM
  • read and modify program data variables
  • process user data with logic functions
  • update the DOM to show changes to the user
  • log any important information for developers

moveText(btn)

moves 4px down the css element

Param Type Description
btn string a css selector

longBreak()

handles a pomodoro break (15 minutes)


pomBreak()

handles a pomodoro break (25 minutes)


setColor(btn)

sets the style for the 3 break-buttons (pomodoro, short and long)

Param Type Description
btn string a css selector

shortBreak()

handles a pomodoro break (5 minutes)


Functions

start()

start/stop button toggle

loadMp3()

loads an audio file

start()

start/stop button toggle

loadMp3()

loads an audio file

TOP



init


TOP



Listeners

Event listeners are used to connect handler functions to user interactions with the DOM.

You can use the same handler in many different listeners, or add more than one listeners to the same DOM element.





TOP