79582195

Date: 2025-04-19 08:59:24
Score: 0.5
Natty:
Report link

Since the event is passed as the first argument, replace onclick="somefunction(event)" with onclick="somefunction(arguments[0]). The alternative is to add an id attribute to the element and a script to add the eventListener, which has the potential of introducing bugs, and is laborious on a large code base.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Peter Brand