cancellableEvent.preventDefault: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 9: Line 9:
|usage = prevent the default action for the current event which is triggering
|usage = prevent the default action for the current event which is triggering
|notes = See also: [[event.isDefaultPrevented|event.isDefaultPrevented]]
|notes = See also: [[event.isDefaultPrevented|event.isDefaultPrevented]]
|exampleJSCS = addEventHandler('onPedInflictDamage', function(event, ped, responsibleEntity, weapon, loss, pedPiece)
{
// Prevent the ped from being damaged.
event.preventDefault();
});
}}
}}
6,834

edits

Navigation menu