Engine.PreventDefault

From Tomb Raider Mod Launcher Wiki
Revision as of 23:00, 25 December 2014 by Jack9267 (talk | contribs) (Created page with "== Function == <syntaxhighlight lang="javascript"> function bool Engine.PreventDefault(); </syntaxhighlight> === Description === This function prevents the default handling...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Function

function bool Engine.PreventDefault();

Description

This function prevents the default handling of an event (only if the event supports this functionality).

Returns

The function returns true if the event was successfully cancelled, false otherwise.

Example

// Prevent chat.
//
Engine.AddEventHandler("OnPlayerChat",function(player,message){
	Engine.PreventDefault();
});

Notes

This function should only be called from within an event handler callback.