Revert "feat(chromium): skip lifecycle waits when waitForExpression or waitForSelector is set"

This reverts commit 430f95f79f.
This commit is contained in:
Julien Neuhart
2026-04-24 11:19:14 +02:00
parent 430f95f79f
commit 8f711b0f99
4 changed files with 6 additions and 78 deletions

View File

@@ -160,22 +160,11 @@ type Options struct {
WaitWindowStatus string
// WaitForExpression is the custom JavaScript expression to wait before
// converting an HTML document until it returns true.
//
// When set, Gotenberg skips the browser lifecycle events
// (DomContentEventFired, LoadEventFired, LoadingFinished,
// networkIdle, networkAlmostIdle) during navigation and treats the
// expression as the sole readiness signal. Encode any load-event
// dependency into the expression itself (for example
// "document.readyState === 'complete' && window.myAppReady").
// converting an HTML document until it returns true
WaitForExpression string
// WaitForSelector is the element query to wait until visible before
// converting an HTML document.
//
// When set, Gotenberg skips the browser lifecycle events during
// navigation and treats the selector visibility as the sole
// readiness signal.
WaitForSelector string
// Cookies are the cookies to put in the Chromium cookies' jar.