change: NewBrowserDeviceOptions

This commit is contained in:
lilong.129
2025-03-04 10:34:47 +08:00
parent b69f5d5b25
commit fe97303f90
3 changed files with 10 additions and 6 deletions

View File

@@ -15,11 +15,7 @@ type BrowserDevice struct {
}
func NewBrowserDevice(opts ...option.BrowserDeviceOption) (device *BrowserDevice, err error) {
options := &option.BrowserDeviceOptions{}
for _, option := range opts {
option(options)
}
options := option.NewBrowserDeviceOptions(opts...)
if options.BrowserID == "" {
browserInfo, err := CreateBrowser(3600)
if err != nil {