feat: use github/bornholm/lorca fork

This commit is contained in:
2024-01-21 14:59:19 +01:00
parent 9884855e3c
commit a1804d3a2e
4 changed files with 13 additions and 12 deletions

View File

@ -18,7 +18,10 @@ type Browser struct {
func (b *Browser) Start() error {
logger.Debug(context.Background(), "starting browser", logger.F("opts", b.opts))
ui, err := lorca.New("", "", b.opts.Width, b.opts.Height, b.opts.ChromeArgs...)
ui, err := lorca.New(
lorca.WithWindowSize(b.opts.Width, b.opts.Height),
lorca.WithAdditionalCustomArgs(b.opts.ChromeArgs...),
)
if err != nil {
return errors.WithStack(err)
}

View File

@ -14,8 +14,8 @@ var DefaultChromeArgs = []string{
func NewOptions(funcs ...OptionsFunc) *Options {
opts := &Options{
Width: 800,
Height: 600,
Width: 0,
Height: 0,
ChromeArgs: DefaultChromeArgs,
}