feat(chromium): skip or waits for networkIdle2 event

This commit is contained in:
Julien Neuhart
2026-03-11 21:17:09 +01:00
parent 8625a4e899
commit 08088c15f4
8 changed files with 49 additions and 6 deletions

View File

@@ -105,6 +105,10 @@ type Options struct {
// rendered until this event is fired.
SkipNetworkIdleEvent bool
// SkipNetworkAlmostIdleEvent set if the conversion should wait for the
// "networkAlmostIdle" event.
SkipNetworkAlmostIdleEvent bool
// FailOnHttpStatusCodes sets if the conversion should fail if the status
// code from the main page matches with one of its entries.
FailOnHttpStatusCodes []int64
@@ -197,6 +201,7 @@ type EmulatedMediaFeature struct {
func DefaultOptions() Options {
return Options{
SkipNetworkIdleEvent: true,
SkipNetworkAlmostIdleEvent: true,
FailOnHttpStatusCodes: []int64{499, 599},
FailOnResourceHttpStatusCodes: nil,
IgnoreResourceHttpStatusDomains: nil,