Event Listeners and Timers
When adding an event listener as an element attribute, what needs to be put before the listener action?
How do you add an event listener without changing any html attributes?
When using a keyboard listener, how do you tell what key was pressed?
have a function input (in this case called event), then use
How do you tell what mouse button was used in a mouse event?
How do you delay a function from happening immediately?
How do you repeatedly call a function with a delay inbetween each iteration?
How does the
It waits untill the GPU/processor is in low use and then calls the function. This is useful for animations since it usually will delay the call by 1/60s.
repeatedly call the function?
No, it should be put inside the function that it calls if you want to make a loop.
Back to Assignments, or the Original Flashcards(done with only html and css!).