From 23fdf8110c2e841fc20a4e3a7a4060b17dec253a Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Sat, 8 Jun 2024 22:50:26 +0530 Subject: [PATCH] docs: helper fxn for user input --- server/src/browser-management/inputHandlers.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/server/src/browser-management/inputHandlers.ts b/server/src/browser-management/inputHandlers.ts index 49a3bb11..ea28cb88 100644 --- a/server/src/browser-management/inputHandlers.ts +++ b/server/src/browser-management/inputHandlers.ts @@ -13,7 +13,18 @@ import { Page } from "playwright"; import { throttle } from "../../../src/helpers/inputHelpers"; import { CustomActions } from "../../../src/shared/types"; - +/** + * A wrapper function for handling user input. + * This function gets the active browser instance from the browser pool + * and passes necessary arguments to the appropriate handlers. + * e.g. {@link Generator}, {@link RemoteBrowser.currentPage} + * + * Also ignores any user input while interpretation is in progress. + * + * @param handleCallback The callback handler to be called + * @param args - arguments to be passed to the handler + * @category HelperFunctions + */ const handleWrapper = async ( handleCallback: ( generator: WorkflowGenerator,