Class ScriptRuntime.LookupResult

java.lang.Object
org.htmlunit.corejs.javascript.ScriptRuntime.LookupResult
All Implemented Interfaces:
Serializable
Enclosing class:
ScriptRuntime

public static final class ScriptRuntime.LookupResult extends Object implements Serializable
This is returned from the various "getFooAndThis" methods, so it can return the result, the appropriate "this" object, and the name of the property so that a proper exception can be thrown if the result is not a function.
See Also:
  • Method Details

    • getResult

      public Object getResult()
    • getThis

      public Scriptable getThis()
    • getName

      public String getName()
    • getCallable

      public Callable getCallable()
      Coerce the result to a Callable. If the result is not a Callable, throw a TypeError. The name is used in the error message.
    • call

      public Object call(Context cx, VarScope scope, Object[] args)
      A convenience method to coerce the result to a Callable as in "getCallable()", then call the result with ths stored "this".