Package org.htmlunit.corejs.javascript
Class NativeGlobal
java.lang.Object
org.htmlunit.corejs.javascript.NativeGlobal
- All Implemented Interfaces:
Serializable,IdFunctionCall
This class implements the global native object (function and value properties only).
See ECMA 15.1.[12].
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Objectprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final int(package private) static final longprivate static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic EcmaErrorconstructError(Context cx, String error, String message, Scriptable scope) Deprecated.static EcmaErrorconstructError(Context cx, String error, String message, Scriptable scope, String sourceName, int lineNumber, int columnNumber, String lineSource) Deprecated.private static Stringprivate static Stringprivate static booleanencodeUnescaped(char c, boolean fullUri) execIdCall(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) 'thisObj' will be null if invoked as constructor, in which case instance of Scriptable should be returnedstatic voidinit(Context cx, Scriptable scope, boolean sealed) (package private) static booleanisEvalFunction(Object functionObj) private static ObjectThe global method escape, as per ECMA-262 15.1.2.4.private static Objectjs_eval(Context cx, Scriptable scope, Object[] args) This is an indirect call to eval, and thus uses the global environment.(package private) static Objectjs_parseFloat(Object[] args) The global method parseFloat, as per ECMA-262 15.1.2.3.(package private) static Objectjs_parseInt(Context cx, Object[] args) The global method parseInt, as per ECMA-262 15.1.2.2.private static Objectjs_unescape(Object[] args) The global unescape method, as per ECMA-262 15.1.2.5.private static intoneUcs4ToUtf8Char(byte[] utf8Buffer, int ucs4Char) private static chartoHexChar(int i) private static intunHex(char c) private static intunHex(char c1, char c2) private static EcmaErroruriError()
-
Field Details
-
serialVersionUID
static final long serialVersionUID- See Also:
-
URI_DECODE_RESERVED
- See Also:
-
INVALID_UTF8
private static final int INVALID_UTF8- See Also:
-
FTAG
-
Id_decodeURI
private static final int Id_decodeURI- See Also:
-
Id_decodeURIComponent
private static final int Id_decodeURIComponent- See Also:
-
Id_encodeURI
private static final int Id_encodeURI- See Also:
-
Id_encodeURIComponent
private static final int Id_encodeURIComponent- See Also:
-
Id_escape
private static final int Id_escape- See Also:
-
Id_eval
private static final int Id_eval- See Also:
-
Id_isFinite
private static final int Id_isFinite- See Also:
-
Id_isNaN
private static final int Id_isNaN- See Also:
-
Id_isXMLName
private static final int Id_isXMLName- See Also:
-
Id_parseFloat
private static final int Id_parseFloat- See Also:
-
Id_parseInt
private static final int Id_parseInt- See Also:
-
Id_unescape
private static final int Id_unescape- See Also:
-
Id_uneval
private static final int Id_uneval- See Also:
-
LAST_SCOPE_FUNCTION_ID
private static final int LAST_SCOPE_FUNCTION_ID- See Also:
-
Id_new_CommonError
private static final int Id_new_CommonError- See Also:
-
-
Constructor Details
-
NativeGlobal
public NativeGlobal()
-
-
Method Details
-
init
-
execIdCall
public Object execIdCall(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) Description copied from interface:IdFunctionCall'thisObj' will be null if invoked as constructor, in which case instance of Scriptable should be returned- Specified by:
execIdCallin interfaceIdFunctionCall
-
js_parseInt
The global method parseInt, as per ECMA-262 15.1.2.2. -
js_parseFloat
The global method parseFloat, as per ECMA-262 15.1.2.3.- Parameters:
args- the arguments to parseFloat, ignoring args[>=1]
-
js_escape
The global method escape, as per ECMA-262 15.1.2.4.Includes code for the 'mask' argument supported by the C escape method, which used to be part of the browser embedding. Blame for the strange constant names should be directed there.
-
js_unescape
The global unescape method, as per ECMA-262 15.1.2.5. -
js_eval
This is an indirect call to eval, and thus uses the global environment. Direct calls are executed via ScriptRuntime.callSpecial(). -
isEvalFunction
-
constructError
@Deprecated public static EcmaError constructError(Context cx, String error, String message, Scriptable scope) Deprecated.UseScriptRuntime.constructError(String,String)instead. -
constructError
@Deprecated public static EcmaError constructError(Context cx, String error, String message, Scriptable scope, String sourceName, int lineNumber, int columnNumber, String lineSource) Deprecated. -
encode
-
toHexChar
private static char toHexChar(int i) -
unHex
private static int unHex(char c) -
unHex
private static int unHex(char c1, char c2) -
decode
-
encodeUnescaped
private static boolean encodeUnescaped(char c, boolean fullUri) -
uriError
-
oneUcs4ToUtf8Char
private static int oneUcs4ToUtf8Char(byte[] utf8Buffer, int ucs4Char)
-
ScriptRuntime.constructError(String,String)instead.