change: move code

This commit is contained in:
lilong.129
2025-05-26 16:08:27 +08:00
parent 7045a9d452
commit 1bd2b1ba5e
6 changed files with 70 additions and 67 deletions

View File

@@ -2,6 +2,7 @@ package uixt
import (
"bytes"
"fmt"
"github.com/pkg/errors"
"github.com/rs/zerolog/log"
@@ -30,6 +31,9 @@ func NewBrowserDevice(opts ...option.BrowserDeviceOption) (device *BrowserDevice
}
log.Info().Str("browserID", device.Options.BrowserID).Msg("init browser device")
if err := device.Setup(); err != nil {
return nil, fmt.Errorf("setup browser device failed: %w", err)
}
return device, nil
}