From 915bcfbf13da81fa6bfdfa25b03d005a5d21efd3 Mon Sep 17 00:00:00 2001 From: Shuchang Zheng Date: Tue, 25 Mar 2025 02:28:31 -0700 Subject: [PATCH] rename js sleep to asyncSleepFor (#2016) --- skyvern/webeye/scraper/domUtils.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/skyvern/webeye/scraper/domUtils.js b/skyvern/webeye/scraper/domUtils.js index 9102299e..4ba4e437 100644 --- a/skyvern/webeye/scraper/domUtils.js +++ b/skyvern/webeye/scraper/domUtils.js @@ -2165,7 +2165,7 @@ function waitForNextFrame() { }); } -function sleep(ms) { +function asyncSleepFor(ms) { return new Promise((resolve) => setTimeout(resolve, ms)); } @@ -2311,7 +2311,7 @@ async function stopGlobalIncrementalObserver() { (await window.globalParsedElementCounter.get()) < window.globalOneTimeIncrementElements.length ) { - await sleep(100); + await asyncSleepFor(100); } window.globalOneTimeIncrementElements = []; window.globalDomDepthMap = new Map(); @@ -2322,7 +2322,7 @@ async function getIncrementElements() { (await window.globalParsedElementCounter.get()) < window.globalOneTimeIncrementElements.length ) { - await sleep(100); + await asyncSleepFor(100); } // cleanup the chidren tree, remove the duplicated element