-
-
Notifications
You must be signed in to change notification settings - Fork 296
Description
Currently, the page load is detected by repeatedly evaluating document.readyState
and waiting until it equals 'complete'. The proposal is to introduce a new attribute in the Options object called page_load_state
, which can have values like 'complete' or 'interactable'. The default would remain 'complete'.
This involves creating an Enum for these strategies to provide better typing and usability. Instead of checking document.readyState == 'complete', the code should compare it to self.options.page_load_state, making the wait behavior configurable.
This change will give users more control over how strictly the page load is waited on, enabling faster interactions when full page completeness isn't necessary.
The implementation touches the options class definition, typing, and the async wait loop for page load, so careful attention to tests and backwards compatibility is important.