Class NativeFunctionToStringFunction
java.lang.Object
org.htmlunit.javascript.FunctionWrapper
org.htmlunit.javascript.NativeFunctionToStringFunction
- All Implemented Interfaces:
Serializable, org.htmlunit.corejs.javascript.Callable, org.htmlunit.corejs.javascript.Constructable, org.htmlunit.corejs.javascript.Function, org.htmlunit.corejs.javascript.Scriptable
Replacement (in fact a wrapper) for Rhino's native toString function on Function prototype
allowing to produce the desired formatting.
- Author:
- Marc Guillemot, Ronald Brill, Ahmed Ashour
- See Also:
-
Field Summary
Fields inherited from interface org.htmlunit.corejs.javascript.Scriptable
NOT_FOUND -
Method Summary
Modifier and TypeMethodDescriptioncall(org.htmlunit.corejs.javascript.Context cx, org.htmlunit.corejs.javascript.Scriptable scope, org.htmlunit.corejs.javascript.Scriptable thisObj, Object[] args) static voidinstallFix(org.htmlunit.corejs.javascript.Scriptable window, BrowserVersion browserVersion) Install the wrapper in place of the native toString function on Function's prototype.Methods inherited from class FunctionWrapper
construct, delete, delete, get, get, getClassName, getDefaultValue, getIds, getParentScope, getPrototype, has, has, hasInstance, put, put, setParentScope, setPrototype
-
Method Details
-
installFix
public static void installFix(org.htmlunit.corejs.javascript.Scriptable window, BrowserVersion browserVersion) Install the wrapper in place of the native toString function on Function's prototype.- Parameters:
window- the scopebrowserVersion- the simulated browser
-
call
public Object call(org.htmlunit.corejs.javascript.Context cx, org.htmlunit.corejs.javascript.Scriptable scope, org.htmlunit.corejs.javascript.Scriptable thisObj, Object[] args) - Specified by:
callin interfaceorg.htmlunit.corejs.javascript.Callable- Specified by:
callin interfaceorg.htmlunit.corejs.javascript.Function- Overrides:
callin classFunctionWrapper
-