WindowEventLoop
WindowEventLoop
ภาพรวม
WindowEventLoop เป็นคลาสใน Aspose.Html FOSS สำหรับ Python.
ตัวจัดเวลางาน-ต้นทางภายในที่ใช้โดย Window/BrowsingContext.
คลาสนี้ให้ 11 เมธอดสำหรับทำงานกับอ็อบเจกต์ WindowEventLoop ในโปรแกรม Python เมธอดที่มีให้รวมถึง: __init__, cancel, cancel_timer, cleanup, clear_timer_work, dispatch_timer_tasks, drain, register_task_source, schedule, schedule_microtask_checkpoint, schedule_timer. สมาชิกสาธารณะทั้งหมดสามารถเข้าถึงได้โดยแอปพลิเคชัน Python ใด ๆ หลังจากติดตั้งแพ็กเกจ Aspose.Html FOSS สำหรับ Python package.
วิธีการ
| ลายเซ็น | คำอธิบาย |
|---|---|
__init__() | Calls init บนอินสแตนซ์ WindowEventLoop นี้. |
register_task_source(source_name: str) | เรียก register_task_source(source_name) บนอินสแตนซ์ WindowEventLoop นี้. |
| `schedule(source_name: str, phase: str, token: object | None, callback: Callable[[], None] |
| `schedule_microtask_checkpoint(callback: Callable[[], None], token: object | None)` |
cancel(token: object) | เรียกใช้ cancel(token) บนอินสแตนซ์ WindowEventLoop นี้. |
cleanup(token: object) | เรียกใช้ cleanup(token) บนอินสแตนซ์ WindowEventLoop นี้. |
drain() | เรียกใช้ drain บนอินสแตนซ์ WindowEventLoop นี้. |
schedule_timer(callback: Callable[..., object], args: tuple[object, ...], repeating: bool) → int | เรียกใช้ schedule_timer(callback, args, repeating) บนอินสแตนซ์ WindowEventLoop นี้. |
cancel_timer(handle: int) | เรียก cancel_timer(handle) บนอินสแตนซ์ WindowEventLoop นี้. |
clear_timer_work() | เรียก clear_timer_work บนอินสแตนซ์ WindowEventLoop นี้. |
| `dispatch_timer_tasks(max_tasks: int | None)→int` |