Skip to content

Commit

Permalink
Desobekify BrowserContext.Screen
Browse files Browse the repository at this point in the history
  • Loading branch information
inancgumus committed Nov 6, 2024
1 parent 49930b5 commit 2c72485
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions browser/browser_mapping.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,11 @@ func parseBrowserContextOptions(ctx context.Context, opts sobek.Value) (*common.
b.ReducedMotion = common.ReducedMotionNoPreference
}
case "screen":
var screen common.Screen
if err := screen.Parse(ctx, o.Get(k).ToObject(rt)); err != nil {
var err error
b.Screen, err = exportTo[common.Screen](rt, o.Get(k))
if err != nil {
return nil, fmt.Errorf("parsing screen options: %w", err)
}
b.Screen = screen
case "timezoneID":
b.TimezoneID = o.Get(k).String()
case "userAgent":
Expand Down

0 comments on commit 2c72485

Please sign in to comment.