Using Global Event Handlers

Do they stay as lowercase:

oncancel
onerror
onchange
onblur
onended
onLoad

or should they be changed to:

onCancel
onError
onChange
onBlur
onEnded
onLoad

What happens when you change them?

1 Like

oh, it breaks the code.

So leave them as they are supposed to be.

1 Like

Only certain ones get this treatment, and Global Event Handlers isn’t one of them.

classList
playPauseIcon(true);
addEventListener

It’s called camelCase, and it’s only given to variables.

There’s more that you can learn about camelcase and other related issues in the following article:

4 Likes

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.