preventEvent

stops the event processing and cancels its default action (called in some event handler)

boolean preventEvent(Event ev);

Parameters

evEventa native HTML event

Returns

booleanfalse

Example

<a id="mylink" href='http://google.com'>Google</a>
document.getElementById("mylink").onclick = function(e)
{
    alert("The link doesn't redirect us to the Google page anymore");
    return webix.html.preventEvent(e);
 
}

Details

If the specified event is cancelable, the method signifies that it should be cancelled. If the event can't be cancelled the method has no effect.

See also
Back to top