Remove event.ts stopEvent (#157182)

Remove event.stopEvent

This function has the same function as EventHelper.stop but is only used in one place
This commit is contained in:
Matt Bierner
2022-08-05 10:16:45 -07:00
committed by GitHub
parent 02505d3499
commit 427530e884
3 changed files with 7 additions and 21 deletions

View File

@@ -836,11 +836,12 @@ export interface EventLike {
}
export const EventHelper = {
stop: function (e: EventLike, cancelBubble?: boolean) {
stop: <T extends EventLike>(e: T, cancelBubble?: boolean): T => {
e.preventDefault();
if (cancelBubble) {
e.stopPropagation();
}
return e;
}
};