Package org.htmlunit.javascript
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.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class
(package private) static class
-
Field Summary
Fields inherited from interface org.htmlunit.corejs.javascript.Scriptable
NOT_FOUND
-
Constructor Summary
ConstructorsConstructorDescriptionNativeFunctionToStringFunction
(org.htmlunit.corejs.javascript.Function wrapped) -
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 void
installFix
(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 org.htmlunit.javascript.FunctionWrapper
construct, delete, delete, get, get, getClassName, getDefaultValue, getIds, getParentScope, getPrototype, has, has, hasInstance, put, put, setParentScope, setPrototype
-
Constructor Details
-
NativeFunctionToStringFunction
NativeFunctionToStringFunction(org.htmlunit.corejs.javascript.Function wrapped)
-
-
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:
call
in interfaceorg.htmlunit.corejs.javascript.Callable
- Specified by:
call
in interfaceorg.htmlunit.corejs.javascript.Function
- Overrides:
call
in classFunctionWrapper
-