Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This function cancels an event and prevents it from bubbling up.

Parameters:

  • event – reference to the event name to cancel

Example:

In this example, we prevent the onclick event if other fields on the screen are not validated properly.

...