From 95b59c3e1f7e36d7162d8071ccc393d87d4e672a Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Sat, 8 Jun 2024 23:00:35 +0530 Subject: [PATCH] docs: handle mouse move --- server/src/browser-management/inputHandlers.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/server/src/browser-management/inputHandlers.ts b/server/src/browser-management/inputHandlers.ts index 0142d956..d3efd223 100644 --- a/server/src/browser-management/inputHandlers.ts +++ b/server/src/browser-management/inputHandlers.ts @@ -173,7 +173,17 @@ const onMousemove = async (coordinates: Coordinates) => { await handleWrapper(handleMousemove, coordinates); } - +/** + * A mousemove event handler. + * Reproduces the mousemove event on the remote browser instance + * and generates data for the client's highlighter. + * Mousemove is also not reflected in the workflow. + * @param generator - the workflow generator {@link Generator} + * @param page - the active page of the remote browser + * @param x - the x coordinate of the mousemove event + * @param y - the y coordinate of the mousemove event + * @category BrowserManagement + */ const handleMousemove = async (generator: WorkflowGenerator, page: Page, { x, y }: Coordinates) => { try { await page.mouse.move(x, y);