Skip to content

Commit

Permalink
Remove Screen.Parse and constants
Browse files Browse the repository at this point in the history
  • Loading branch information
inancgumus committed Nov 6, 2024
1 parent 2c72485 commit 13bd06d
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions common/page.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,29 +106,6 @@ type Screen struct {
Height int64 `js:"height"`
}

const (
screenWidth = "width"
screenHeight = "height"
)

// Parse parses the given screen options.
func (s *Screen) Parse(ctx context.Context, screen sobek.Value) error {
rt := k6ext.Runtime(ctx)
if screen != nil && !sobek.IsUndefined(screen) && !sobek.IsNull(screen) {
screen := screen.ToObject(rt)
for _, k := range screen.Keys() {
switch k {
case screenWidth:
s.Width = screen.Get(k).ToInteger()
case screenHeight:
s.Height = screen.Get(k).ToInteger()
}
}
}

return nil
}

// ColorScheme represents a browser color scheme.
type ColorScheme string

Expand Down

0 comments on commit 13bd06d

Please sign in to comment.