mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-16 04:12:16 +01:00
docs(chromium): tighten paint-polyfill always-on godoc per CONTRIBUTING style
This commit is contained in:
@@ -124,12 +124,11 @@ const paintCallbacksPolyfill = `
|
|||||||
|
|
||||||
// injectPaintCallbacksPolyfillActionFunc installs the
|
// injectPaintCallbacksPolyfillActionFunc installs the
|
||||||
// [paintCallbacksPolyfill] via [page.AddScriptToEvaluateOnNewDocument]
|
// [paintCallbacksPolyfill] via [page.AddScriptToEvaluateOnNewDocument]
|
||||||
// so that it runs before any user script on the navigated page. The
|
// before any user script runs. Runs on every conversion: Chromium's
|
||||||
// shim is installed unconditionally: the native rAF, ResizeObserver,
|
// headless-print pipeline does not fire the native rAF,
|
||||||
// and IntersectionObserver APIs do not fire during Chromium's
|
// ResizeObserver, and IntersectionObserver, so the timer-backed
|
||||||
// headless-print render, so replacing them with timer-backed
|
// replacements fire the user's callbacks when the page relies on them
|
||||||
// implementations either restores the behavior the page expects or has
|
// and have no effect otherwise.
|
||||||
// no effect when the page never calls them.
|
|
||||||
func injectPaintCallbacksPolyfillActionFunc(logger *slog.Logger) chromedp.ActionFunc {
|
func injectPaintCallbacksPolyfillActionFunc(logger *slog.Logger) chromedp.ActionFunc {
|
||||||
return func(ctx context.Context) error {
|
return func(ctx context.Context) error {
|
||||||
logger.DebugContext(ctx, "inject paint-callbacks polyfill")
|
logger.DebugContext(ctx, "inject paint-callbacks polyfill")
|
||||||
|
|||||||
Reference in New Issue
Block a user