()
| 388 | done = [] |
| 389 | |
| 390 | async def scroll(): |
| 391 | done.append(False) |
| 392 | await div.scroll_into_view_if_needed() |
| 393 | done.append(True) |
| 394 | |
| 395 | promise = asyncio.create_task(scroll()) |
| 396 | await asyncio.sleep(0) # execute scheduled tasks, but don't await them |