1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-25 09:38:06 +02:00

Merge pull request #17915 from timvandermeij/lint-waitfortimeout

Implement a linting rule to discourage using `waitForTimeout` for new usages
This commit is contained in:
Tim van der Meij 2024-04-11 12:19:36 +02:00 committed by GitHub
commit d70caca3e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 50 additions and 0 deletions

View file

@ -115,6 +115,7 @@ async function clearInput(page, selector) {
await page.click(selector);
await kbSelectAll(page);
await page.keyboard.press("Backspace");
// eslint-disable-next-line no-restricted-syntax
await waitForTimeout(10);
}
@ -353,6 +354,7 @@ async function serializeBitmapDimensions(page) {
async function dragAndDropAnnotation(page, startX, startY, tX, tY) {
await page.mouse.move(startX, startY);
await page.mouse.down();
// eslint-disable-next-line no-restricted-syntax
await waitForTimeout(10);
await page.mouse.move(startX + tX, startY + tY);
await page.mouse.up();