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:
commit
d70caca3e2
5 changed files with 50 additions and 0 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue