UNPKG

@progress/kendo-angular-common

Version:
30 lines (29 loc) 1.13 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2020 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ var PreventableEvent = /** @class */ (function () { function PreventableEvent() { this.prevented = false; } /** * Prevents the default action for a specified event. * In this way, the source component suppresses * the built-in behavior that follows the event. */ PreventableEvent.prototype.preventDefault = function () { this.prevented = true; }; /** * Returns `true` if the event was prevented * by any of its subscribers. * * @returns `true` if the default action was prevented. * Otherwise, returns `false`. */ PreventableEvent.prototype.isDefaultPrevented = function () { return this.prevented; }; return PreventableEvent; }()); export { PreventableEvent };