跳转到内容
View in the app

A better way to browse. Learn more.

彼岸论坛

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
欢迎抵达彼岸 彼岸花开 此处谁在 -彼岸论坛

[程序员] 求助 ! chromedp 的截图功能

发表于
背景:
公司最近有需求,要求用 chromedp 根据鼠标点击在页面点击触发截图功能。

遇到的问题:
截图功能使用的是 chromedp.FullScreenshot(&buf, 60) 函数
但是每次截图页面的 CSS 都会重新加载一下,导致页面会闪一下。

我看了日志,发现在调用 chromedp.FullScreenshot(&buf, 60) 函数的同时,会触发 CSS 重新加载的函数,目前我是通过在截图前禁用 css.Disable().Do(ctx) 和 dom.Disable().Do(ctx)实现的。
但是还有一个函数没法禁用,就是
{"method":"Page.frameResized","params:{},"sessionId":"92655201B7EA8489527B67E16091F564"}

有老哥遇到过同样的问题吗?都是如何解决的呢?

Featured Replies

No posts to show

创建帐户或登录来提出意见

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.