@@ -231,7 +231,7 @@ func (h *ElementHandle) checkHitTargetAt(apiCtx context.Context, point Position)
231
231
return injected.checkHitTargetAt(node, point);
232
232
}
233
233
`
234
- opts := evaluateOptions {
234
+ opts := evalOptions {
235
235
forceCallable : true ,
236
236
returnByValue : true ,
237
237
}
@@ -257,7 +257,7 @@ func (h *ElementHandle) checkElementState(apiCtx context.Context, state string)
257
257
return injected.checkElementState(node, state);
258
258
}
259
259
`
260
- opts := evaluateOptions {
260
+ opts := evalOptions {
261
261
forceCallable : true ,
262
262
returnByValue : true ,
263
263
}
@@ -378,7 +378,7 @@ func (h *ElementHandle) dispatchEvent(apiCtx context.Context, typ string, eventI
378
378
injected.dispatchEvent(node, type, eventInit);
379
379
}
380
380
`
381
- opts := evaluateOptions {
381
+ opts := evalOptions {
382
382
forceCallable : true ,
383
383
returnByValue : true ,
384
384
}
@@ -392,7 +392,7 @@ func (h *ElementHandle) fill(apiCtx context.Context, value string) (interface{},
392
392
return injected.fill(node, value);
393
393
}
394
394
`
395
- opts := evaluateOptions {
395
+ opts := evalOptions {
396
396
forceCallable : true ,
397
397
returnByValue : true ,
398
398
}
@@ -415,7 +415,7 @@ func (h *ElementHandle) focus(apiCtx context.Context, resetSelectionIfNotFocused
415
415
return injected.focusNode(node, resetSelectionIfNotFocused);
416
416
}
417
417
`
418
- opts := evaluateOptions {
418
+ opts := evalOptions {
419
419
forceCallable : true ,
420
420
returnByValue : true ,
421
421
}
@@ -438,7 +438,7 @@ func (h *ElementHandle) getAttribute(apiCtx context.Context, name string) (inter
438
438
return element.getAttribute('` + name + `');
439
439
}
440
440
`
441
- opts := evaluateOptions {
441
+ opts := evalOptions {
442
442
forceCallable : true ,
443
443
returnByValue : true ,
444
444
}
@@ -455,7 +455,7 @@ func (h *ElementHandle) innerHTML(apiCtx context.Context) (interface{}, error) {
455
455
return element.innerHTML;
456
456
}
457
457
`
458
- opts := evaluateOptions {
458
+ opts := evalOptions {
459
459
forceCallable : true ,
460
460
returnByValue : true ,
461
461
}
@@ -468,7 +468,7 @@ func (h *ElementHandle) innerText(apiCtx context.Context) (interface{}, error) {
468
468
return element.innerText;
469
469
}
470
470
`
471
- opts := evaluateOptions {
471
+ opts := evalOptions {
472
472
forceCallable : true ,
473
473
returnByValue : true ,
474
474
}
@@ -484,7 +484,7 @@ func (h *ElementHandle) inputValue(apiCtx context.Context) (interface{}, error)
484
484
return element.value;
485
485
}
486
486
`
487
- opts := evaluateOptions {
487
+ opts := evalOptions {
488
488
forceCallable : true ,
489
489
returnByValue : true ,
490
490
}
@@ -521,7 +521,7 @@ func (h *ElementHandle) offsetPosition(apiCtx context.Context, offset *Position)
521
521
return injected.getElementBorderWidth(node);
522
522
}
523
523
`
524
- opts := evaluateOptions {
524
+ opts := evalOptions {
525
525
forceCallable : true ,
526
526
returnByValue : true ,
527
527
}
@@ -685,7 +685,7 @@ func (h *ElementHandle) selectOption(apiCtx context.Context, values goja.Value)
685
685
return injected.selectOptions(node, values);
686
686
}
687
687
`
688
- opts := evaluateOptions {
688
+ opts := evalOptions {
689
689
forceCallable : true ,
690
690
returnByValue : false ,
691
691
}
@@ -708,7 +708,7 @@ func (h *ElementHandle) selectText(apiCtx context.Context) error {
708
708
return injected.selectText(node);
709
709
}
710
710
`
711
- opts := evaluateOptions {
711
+ opts := evalOptions {
712
712
forceCallable : true ,
713
713
returnByValue : true ,
714
714
}
@@ -760,7 +760,7 @@ func (h *ElementHandle) textContent(apiCtx context.Context) (interface{}, error)
760
760
return element.textContent;
761
761
}
762
762
`
763
- opts := evaluateOptions {
763
+ opts := evalOptions {
764
764
forceCallable : true ,
765
765
returnByValue : true ,
766
766
}
@@ -787,7 +787,7 @@ func (h *ElementHandle) waitAndScrollIntoViewIfNeeded(apiCtx context.Context, fo
787
787
return [window.scrollX, window.scrollY];
788
788
}
789
789
`
790
- opts := evaluateOptions {
790
+ opts := evalOptions {
791
791
forceCallable : true ,
792
792
returnByValue : true ,
793
793
}
@@ -807,7 +807,7 @@ func (h *ElementHandle) waitForElementState(apiCtx context.Context, states []str
807
807
return injected.waitForElementStates(node, states, timeout);
808
808
}
809
809
`
810
- opts := evaluateOptions {
810
+ opts := evalOptions {
811
811
forceCallable : true ,
812
812
returnByValue : true ,
813
813
}
@@ -839,7 +839,7 @@ func (h *ElementHandle) waitForSelector(apiCtx context.Context, selector string,
839
839
return injected.waitForSelector(selector, node, strict, state, 'raf', timeout, ...args);
840
840
}
841
841
`
842
- eopts := evaluateOptions {
842
+ eopts := evalOptions {
843
843
forceCallable : true ,
844
844
returnByValue : false ,
845
845
}
@@ -1111,7 +1111,7 @@ func (h *ElementHandle) OwnerFrame() api.Frame {
1111
1111
return injected.getDocumentElement(node);
1112
1112
}
1113
1113
`
1114
- opts := evaluateOptions {
1114
+ opts := evalOptions {
1115
1115
forceCallable : true ,
1116
1116
returnByValue : false ,
1117
1117
}
@@ -1167,7 +1167,7 @@ func (h *ElementHandle) Query(selector string) api.ElementHandle {
1167
1167
return injected.querySelector(selector, node || document, false);
1168
1168
}
1169
1169
`
1170
- opts := evaluateOptions {
1170
+ opts := evalOptions {
1171
1171
forceCallable : true ,
1172
1172
returnByValue : false ,
1173
1173
}
@@ -1203,7 +1203,7 @@ func (h *ElementHandle) QueryAll(selector string) []api.ElementHandle {
1203
1203
return injected.querySelectorAll(selector, node || document, false);
1204
1204
}
1205
1205
`
1206
- opts := evaluateOptions {
1206
+ opts := evalOptions {
1207
1207
forceCallable : true ,
1208
1208
returnByValue : false ,
1209
1209
}
@@ -1402,7 +1402,7 @@ func (h *ElementHandle) WaitForSelector(selector string, opts goja.Value) api.El
1402
1402
// The js code can call helper functions from injected_script.js.
1403
1403
func (h * ElementHandle ) evalWithScript (
1404
1404
ctx context.Context ,
1405
- opts evaluateOptions , js string , args ... interface {},
1405
+ opts evalOptions , js string , args ... interface {},
1406
1406
) (interface {}, error ) {
1407
1407
script , err := h .execCtx .getInjectedScript (h .ctx )
1408
1408
if err != nil {
@@ -1415,7 +1415,7 @@ func (h *ElementHandle) evalWithScript(
1415
1415
// eval evaluates the given js code in the scope of this ElementHandle and returns the result.
1416
1416
func (h * ElementHandle ) eval (
1417
1417
ctx context.Context ,
1418
- opts evaluateOptions , js string , args ... interface {},
1418
+ opts evalOptions , js string , args ... interface {},
1419
1419
) (interface {}, error ) {
1420
1420
// passing `h` makes it evaluate js code in the element handle's scope.
1421
1421
args = append ([]interface {}{h }, args ... )
@@ -1424,7 +1424,7 @@ func (h *ElementHandle) eval(
1424
1424
for i , arg := range args {
1425
1425
gargs [i ] = rt .ToValue (arg )
1426
1426
}
1427
- result , err := h .execCtx .evaluate (ctx , opts , rt .ToValue (js ), gargs ... )
1427
+ result , err := h .execCtx .eval (ctx , opts , rt .ToValue (js ), gargs ... )
1428
1428
if err != nil {
1429
1429
err = fmt .Errorf ("element handle cannot evaluate: %w" , err )
1430
1430
}
0 commit comments