Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Commit 598e786

Browse files
committed
Remove Screen.Parse and constants
1 parent b4edff5 commit 598e786

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

common/page.go

-23
Original file line numberDiff line numberDiff line change
@@ -106,29 +106,6 @@ type Screen struct {
106106
Height int64 `js:"height"`
107107
}
108108

109-
const (
110-
screenWidth = "width"
111-
screenHeight = "height"
112-
)
113-
114-
// Parse parses the given screen options.
115-
func (s *Screen) Parse(ctx context.Context, screen sobek.Value) error {
116-
rt := k6ext.Runtime(ctx)
117-
if screen != nil && !sobek.IsUndefined(screen) && !sobek.IsNull(screen) {
118-
screen := screen.ToObject(rt)
119-
for _, k := range screen.Keys() {
120-
switch k {
121-
case screenWidth:
122-
s.Width = screen.Get(k).ToInteger()
123-
case screenHeight:
124-
s.Height = screen.Get(k).ToInteger()
125-
}
126-
}
127-
}
128-
129-
return nil
130-
}
131-
132109
// ColorScheme represents a browser color scheme.
133110
type ColorScheme string
134111

0 commit comments

Comments
 (0)