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

Commit 019f8ec

Browse files
committed
Remove superfluous comments from ElementHandle
1 parent f836892 commit 019f8ec

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

common/element_handle.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1404,12 +1404,10 @@ func (h *ElementHandle) evalWithScript(
14041404
ctx context.Context,
14051405
opts evaluateOptions, js string, args ...interface{},
14061406
) (interface{}, error) {
1407-
// get the injected script's handle so that js function can call its functions.
14081407
script, err := h.execCtx.getInjectedScript(h.ctx)
14091408
if err != nil {
14101409
return nil, fmt.Errorf("cannot get injected script: %w", err)
14111410
}
1412-
// passing `script` allows `js` to use `script`'s functions.
14131411
args = append([]interface{}{script}, args...)
14141412
return h.eval(ctx, opts, js, args...)
14151413
}
@@ -1421,13 +1419,11 @@ func (h *ElementHandle) eval(
14211419
) (interface{}, error) {
14221420
// passing `h` makes it evaluate js code in the element handle's scope.
14231421
args = append([]interface{}{h}, args...)
1424-
// convert the arguments to goja values.
14251422
rt := k6common.GetRuntime(ctx)
14261423
gargs := make([]goja.Value, len(args))
14271424
for i, arg := range args {
14281425
gargs[i] = rt.ToValue(arg)
14291426
}
1430-
// call the javascript function.
14311427
result, err := h.execCtx.evaluate(ctx, opts, rt.ToValue(js), gargs...)
14321428
if err != nil {
14331429
err = fmt.Errorf("element handle cannot evaluate: %w", err)

0 commit comments

Comments
 (0)