mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 18:25:37 +02:00
Merge pull request #17966 from timvandermeij/waitForTimeout
Remove `waitForTimeout` usage from the helper functions
This commit is contained in:
commit
aaa55d2b38
1 changed files with 3 additions and 4 deletions
|
@ -115,8 +115,9 @@ async function clearInput(page, selector) {
|
||||||
await page.click(selector);
|
await page.click(selector);
|
||||||
await kbSelectAll(page);
|
await kbSelectAll(page);
|
||||||
await page.keyboard.press("Backspace");
|
await page.keyboard.press("Backspace");
|
||||||
// eslint-disable-next-line no-restricted-syntax
|
await page.waitForFunction(
|
||||||
await waitForTimeout(10);
|
`document.querySelector('${selector}').value === ""`
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getSelector(id) {
|
function getSelector(id) {
|
||||||
|
@ -354,8 +355,6 @@ async function serializeBitmapDimensions(page) {
|
||||||
async function dragAndDropAnnotation(page, startX, startY, tX, tY) {
|
async function dragAndDropAnnotation(page, startX, startY, tX, tY) {
|
||||||
await page.mouse.move(startX, startY);
|
await page.mouse.move(startX, startY);
|
||||||
await page.mouse.down();
|
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.move(startX + tX, startY + tY);
|
||||||
await page.mouse.up();
|
await page.mouse.up();
|
||||||
await page.waitForSelector("#viewer:not(.noUserSelect)");
|
await page.waitForSelector("#viewer:not(.noUserSelect)");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue