-
-
Notifications
You must be signed in to change notification settings - Fork 347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
【SetDocumentContent】能像puppeteer一样监听load #901
Labels
question
Questions related to rod
Comments
Please add a valid Please fix the format of your markdown: 2 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```js"]
4 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```"] generated by check-issue |
|
ysmood
added
question
Questions related to rod
and removed
enhance
New feature or request
labels
Jul 11, 2023
感谢…本地版本有点低 难怪没找到😭 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
背景: 我是Nodejs服务迁移到go这边,选了rod,然后因为之前主要逻辑的实现是通过puppeteer的setContent来实现的。html内容内可能有各种url资源加载。所以需要等待一段时间。
问题:转到rod这边后,找到了SetDocumentContent,但是SetDocumentContent没有这种参数,于是就使用了各种等待的方法。
然后发现除了MustWaitLoad,其他的基本都是超时时间,这样等待的话效率上太低,
现状:
SetDocumentContent后MustWaitLoad不能等待资源加载,其他等待方法均为超时等待,MustWaitLoad为监听load。只能说通过拦截请求来实现我要的效果,但怎么都感觉不是最佳实践。
需求:SetDocumentContent能像puppeteer一样去监听load,或者说又什么其他办法可以实现?
The text was updated successfully, but these errors were encountered: