feat: wrapper to handle wheel event

This commit is contained in:
karishmas6
2024-06-08 22:58:51 +05:30
parent 528774e09c
commit d042a64612

View File

@@ -137,3 +137,13 @@ const handleMousedown = async (generator: WorkflowGenerator, page: Page, { x, y
logger.log('debug', `Clicked on position x:${x}, y:${y}`);
};
/**
* A wrapper function for handling the wheel event.
* @param scrollDeltas - the scroll deltas of the wheel event
* @category HelperFunctions
*/
const onWheel = async (scrollDeltas: ScrollDeltas) => {
logger.log('debug', 'Handling scroll event emitted from client');
await handleWrapper(handleWheel, scrollDeltas);
};