fix: ShowBrowser merge behavior and consistent browser defaults
- Change ShowBrowser from bool to *bool so nil means "don't override" in mergeOptions(), fixing the bug where it always overwrote the base - Add Bool() helper for convenient *bool construction - Align NewInteractiveBrowser default from Chromium to Firefox to match NewBrowser - Update README example and CLI flags for the *bool change Closes #15, #16 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -60,7 +60,7 @@ func NewInteractiveBrowser(ctx context.Context, opts ...BrowserOptions) (Interac
|
||||
var thirtySeconds = 30 * time.Second
|
||||
opt := mergeOptions(BrowserOptions{
|
||||
UserAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:142.0) Gecko/20100101 Firefox/142.0",
|
||||
Browser: BrowserChromium,
|
||||
Browser: BrowserFirefox,
|
||||
Timeout: &thirtySeconds,
|
||||
Dimensions: Size{
|
||||
Width: 1280,
|
||||
|
||||
Reference in New Issue
Block a user