@@ -2576,26 +2576,21 @@ public void setSelectionRange(final SimpleRange selectionRange) {
25762576 * @param function the JavaScript Function to call
25772577 * @param thisObject the "this" object to be used during invocation
25782578 * @param args the arguments to pass into the call
2579- * @param htmlElementScope the HTML element for which this script is being executed
2579+ * @param htmlElement the HTML element for which this script is being executed
25802580 * This element will be the context during the JavaScript execution. If null,
25812581 * the context will default to the page.
25822582 * @return a ScriptResult which will contain both the current page (which may be different from
25832583 * the previous page) and a JavaScript result object.
25842584 */
25852585 public ScriptResult executeJavaScriptFunction (final Object function , final Object thisObject ,
2586- final Object [] args , final DomNode htmlElementScope ) {
2586+ final Object [] args , final DomNode htmlElement ) {
25872587 if (!getWebClient ().isJavaScriptEnabled ()) {
25882588 return new ScriptResult (null );
25892589 }
25902590
2591- return executeJavaScriptFunction ((Function ) function , (Scriptable ) thisObject , args , htmlElementScope );
2592- }
2593-
2594- private ScriptResult executeJavaScriptFunction (final Function function , final Scriptable thisObject ,
2595- final Object [] args , final DomNode htmlElementScope ) {
2596-
25972591 final JavaScriptEngine engine = (JavaScriptEngine ) getWebClient ().getJavaScriptEngine ();
2598- final Object result = engine .callFunction (this , function , thisObject , args , htmlElementScope );
2592+ final Object result = engine .callFunction (this ,
2593+ (Function ) function , (Scriptable ) thisObject , args , htmlElement );
25992594
26002595 return new ScriptResult (result );
26012596 }
0 commit comments