Skip to content

refactor: better way to ensure page has been loaded - #106

Merged
mondaychen merged 1 commit into
mainfrom
wait_for_html_render
Apr 9, 2024
Merged

mondaychen merged 1 commit into
mainfrom
wait_for_html_render

Conversation

@mondaychen

Copy link
Copy Markdown
Contributor

closes #96

@mondaychen mondaychen self-assigned this Apr 8, 2024
@mondaychen
mondaychen force-pushed the wait_for_html_render branch from c6da469 to 1bb7675 Compare April 8, 2024 23:34
Comment thread src/state/currentTask.ts
return activeTab?.status === "complete";
},
200, // check every 200ms
100, // wait for up to 20 seconds (100*200ms)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a thought. 20s itself seems to be a long time, maybe better to couple with some UI indication of waiting such as showing "still waiting for the page to load" for every 5 second. This is not necessary though, because it's rare that some pages take ~20s to load.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point! added issue #109

@mondaychen
mondaychen merged commit 28d8e41 into main Apr 9, 2024
@mondaychen
mondaychen deleted the wait_for_html_render branch May 23, 2024 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement more sophisticated methods to detect whether the page has finished loading

2 participants