Skip navigation links
  • Module
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help

Deprecated API

Contents

  • Terminally Deprecated
  • Interfaces
  • Fields
  • Methods
  • Constructors
  • Terminally Deprecated Elements
    Element
    Description
    org.htmlunit.corejs.javascript.ScriptRuntime.discardLastStoredScriptable(Context)
    org.htmlunit.corejs.javascript.ScriptRuntime.getElemFunctionAndThis(Object, Object, Context, VarScope)
    use ScriptRuntime.getElemAndThis(Object, Object, Context, VarScope)
    org.htmlunit.corejs.javascript.ScriptRuntime.getElemFunctionAndThisOptional(Object, Object, Context, VarScope)
    use ScriptRuntime.getElemAndThisOptional(Object, Object, Context, VarScope)
    org.htmlunit.corejs.javascript.ScriptRuntime.getNameFunctionAndThis(String, Context, VarScope)
    use ScriptRuntime.getNameAndThis(String, Context, VarScope)
    org.htmlunit.corejs.javascript.ScriptRuntime.getNameFunctionAndThisOptional(String, Context, VarScope)
    use ScriptRuntime.getNameAndThisOptional(String, Context, VarScope)
    org.htmlunit.corejs.javascript.ScriptRuntime.getPropFunctionAndThis(Object, String, Context, VarScope)
    Use ScriptRuntime.getPropAndThis(Object, String, Context, VarScope) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.getPropFunctionAndThisOptional(Object, String, Context, VarScope)
    Use ScriptRuntime.getPropAndThis(Object, String, Context, VarScope) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.getValueFunctionAndThisOptional(Object, Context)
    Use ScriptRuntime.getValueAndThisOptional(Object, Context) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.lastStoredScriptable(Context)
  • Deprecated Interfaces
    Interface
    Description
    org.htmlunit.corejs.javascript.ContextListener
    Embeddings that wish to customize newly created Context instances should implement ContextFactory.Listener.
  • Deprecated Fields
    Field
    Description
    org.htmlunit.corejs.javascript.Context.emptyArgs
    As of 1.8.1, use ScriptRuntime.emptyArgs instead.
    org.htmlunit.corejs.javascript.Context.FEATURE_PARENT_PROTO_PROPRTIES
    In previous releases, this name was given to FEATURE_PARENT_PROTO_PROPERTIES.
  • Deprecated Methods
    Method
    Description
    org.htmlunit.corejs.classfile.ClassFileWriter.addLineNumberEntry(short)
    the field is unsigned, so a signed short cannot express half of it. Call ClassFileWriter.addLineNumberEntry(int) instead. Kept so that code compiled against the old signature still links.
    org.htmlunit.corejs.javascript.ClassCache.isInvokerOptimizationEnabled()
    The method always returns false.
    org.htmlunit.corejs.javascript.ClassCache.setInvokerOptimizationEnabled(boolean)
    The method does nothing. Invoker optimization is no longer used by Rhino. On modern JDK like 1.4 or 1.5 the disadvantages of the optimization like increased memory usage or longer initialization time overweight small speed increase that can be gained using generated proxy class to replace reflection.
    org.htmlunit.corejs.javascript.CompilerEnvirons.getOptimizationLevel()
    As of 1.8.0, use CompilerEnvirons.isInterpretedMode() instead.
    org.htmlunit.corejs.javascript.CompilerEnvirons.setOptimizationLevel(int)
    As of 1.8.0, use CompilerEnvirons.setInterpretedMode(boolean) instead.
    org.htmlunit.corejs.javascript.Context.addContextListener(ContextListener)
     
    org.htmlunit.corejs.javascript.Context.call(ContextAction<T>)
    use ContextFactory.call(ContextAction) instead as this method relies on usage of a static singleton "global" ContextFactory.
    org.htmlunit.corejs.javascript.Context.checkOptimizationLevel(int)
    As of 1.8.0, no longer has any use.
    org.htmlunit.corejs.javascript.Context.compileReader(Scriptable, Reader, String, int, Object)
     
    org.htmlunit.corejs.javascript.Context.enter(Context)
    use ContextFactory.enterContext(Context) instead as this method relies on usage of a static singleton "global" ContextFactory.
    org.htmlunit.corejs.javascript.Context.getE4xImplementationFactory()
    org.htmlunit.corejs.javascript.Context.getOptimizationLevel()
    As of 1.8.0, use Context.getEvaluationMethod() instead.
    org.htmlunit.corejs.javascript.Context.isValidOptimizationLevel(int)
    As of 1.8.0, no longer has any use.
    org.htmlunit.corejs.javascript.Context.removeContextListener(ContextListener)
     
    org.htmlunit.corejs.javascript.Context.setCachingEnabled(boolean)
     
    org.htmlunit.corejs.javascript.Context.setOptimizationLevel(int)
    As of 1.8.0, use Context.setEvaluationMethod(EvaluationMethod) instead.
    org.htmlunit.corejs.javascript.Context.toObject(Object, VarScope, Class<?>)
     
    org.htmlunit.corejs.javascript.Context.toType(Object, Class<?>)
     
    org.htmlunit.corejs.javascript.ContextFactory.enter()
    use ContextFactory.enterContext() instead
    org.htmlunit.corejs.javascript.ContextFactory.exit()
    Use Context.exit() instead.
    org.htmlunit.corejs.javascript.ContextListener.contextEntered(Context)
    Rhino runtime never calls the method.
    org.htmlunit.corejs.javascript.ContextListener.contextExited(Context)
    Rhino runtime never calls the method.
    org.htmlunit.corejs.javascript.EcmaError.getColumnNumber()
    Use RhinoException.columnNumber() from the super class.
    org.htmlunit.corejs.javascript.EcmaError.getErrorObject()
    Always returns null.
    org.htmlunit.corejs.javascript.EcmaError.getLineNumber()
    Use RhinoException.lineNumber() from the super class.
    org.htmlunit.corejs.javascript.EcmaError.getLineSource()
    Use RhinoException.lineSource() from the super class.
    org.htmlunit.corejs.javascript.EcmaError.getSourceName()
    Use RhinoException.sourceName() from the super class.
    org.htmlunit.corejs.javascript.EvaluatorException.getColumnNumber()
    Use RhinoException.columnNumber() from the super class.
    org.htmlunit.corejs.javascript.EvaluatorException.getLineNumber()
    Use RhinoException.lineNumber() from the super class.
    org.htmlunit.corejs.javascript.EvaluatorException.getLineSource()
    Use RhinoException.lineSource() from the super class.
    org.htmlunit.corejs.javascript.EvaluatorException.getSourceName()
    Use RhinoException.sourceName() from the super class.
    org.htmlunit.corejs.javascript.FunctionObject.convertArg(Context, VarScope, Object, Class<?>)
    Use FunctionObject.getTypeTag(Class) and FunctionObject.convertArg(Context, VarScope, Object, int, boolean) for type conversion.
    org.htmlunit.corejs.javascript.Hashtable.delete(Object)
    use deleteEntry(Object key) instead because this returns null if the entry was not found or the value of the entry is null
    org.htmlunit.corejs.javascript.Hashtable.get(Object)
    use getEntry(Object key) instead because this returns null if the entry was not found or the value of the entry is null
    org.htmlunit.corejs.javascript.ImporterTopLevel.importPackage(Context, Scriptable, Object[], Function)
    Kept only for compatibility.
    org.htmlunit.corejs.javascript.JavaScriptException.getLineNumber()
    Use RhinoException.lineNumber() from the super class.
    org.htmlunit.corejs.javascript.JavaScriptException.getSourceName()
    Use RhinoException.sourceName() from the super class.
    org.htmlunit.corejs.javascript.NativeArray.jsGet_length()
    Use NativeArray.getLength() instead.
    org.htmlunit.corejs.javascript.NativeFunction.jsGet_name()
    Use BaseFunction.getFunctionName() instead. For backwards compatibility keep an old method name used by Batik and possibly others.
    org.htmlunit.corejs.javascript.NativeGlobal.constructError(Context, String, String, Scriptable)
    Use ScriptRuntime.constructError(String,String) instead.
    org.htmlunit.corejs.javascript.NativeGlobal.constructError(Context, String, String, Scriptable, String, int, int, String)
    Use ScriptRuntime.constructError(String,String,String,int,String,int) instead.
    org.htmlunit.corejs.javascript.NativeJavaArray.wrap(VarScope, Object)
    org.htmlunit.corejs.javascript.NativeJavaObject.canConvert(Object, Class<?>)
    use NativeJavaObject.canConvert(Object, TypeInfo) instead
    org.htmlunit.corejs.javascript.NativeJavaObject.coerceType(Class<?>, Object)
    as of 1.5 Release 4
    org.htmlunit.corejs.javascript.NativeJavaObject.wrap(VarScope, Object, Class<?>)
    Use Context.getWrapFactory() together with calling WrapFactory.wrap(Context, VarScope, Object, Class)
    org.htmlunit.corejs.javascript.Parser.parse(Reader, String, int)
    use parse(String, String, int) instead
    org.htmlunit.corejs.javascript.Ref.set(Context, Object)
    Use Ref.set(Context, VarScope, Object) instead
    org.htmlunit.corejs.javascript.RhinoException.getScriptStackTrace(FilenameFilter)
    the filter argument is ignored as we are able to recognize script stack elements by our own. Use #getScriptStackTrace() instead.
    org.htmlunit.corejs.javascript.Script.exec(Context, VarScope)
    Use Script.exec(Context, VarScope, Scriptable)
    org.htmlunit.corejs.javascript.ScriptableObject.getGetterOrSetter(String, int, boolean)
    since 1.7.14. Use the form with the scope to ensure consistent function prototype handling in all cases.
    org.htmlunit.corejs.javascript.ScriptRuntime.add(CharSequence, Object)
    Use ScriptRuntime.add(Object, Object, Context) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.add(Object, CharSequence)
    Use ScriptRuntime.add(Object, Object, Context) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.call(Context, Object, Object, Object[], VarScope)
    The method is only present for compatibility.
    org.htmlunit.corejs.javascript.ScriptRuntime.createFunctionActivation(JSFunction, VarScope, Object[])
    Use ScriptRuntime.createFunctionActivation(JSFunction, Context, VarScope, Object[], boolean, boolean) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.delete(Object, Object, Context)
    Use ScriptRuntime.delete(Object, Object, Context, VarScope, boolean) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.delete(Object, Object, Context, boolean)
    Use ScriptRuntime.delete(Object, Object, Context, VarScope, boolean) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.discardLastStoredScriptable(Context)
    org.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(Callable, Context, VarScope, Object, Object[])
    Use ScriptRuntime.doTopCall(Callable, Context, VarScope, Scriptable, Object[], boolean) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(Script, Context, VarScope, Object)
    org.htmlunit.corejs.javascript.ScriptRuntime.elemIncrDecr(Object, Object, Context, int)
    Use ScriptRuntime.elemIncrDecr(Object, Object, Context, VarScope, int) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.enumInit(Object, Context, boolean)
    Use ScriptRuntime.enumInit(Object, Context, VarScope, int) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.enumInit(Object, Context, int)
    Use ScriptRuntime.enumInit(Object, Context, VarScope, int) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.enumNext(Object)
    since 1.7.15. Use ScriptRuntime.enumNext(Object, Context) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.getElemFunctionAndThis(Object, Object, Context)
    Use ScriptRuntime.getElemFunctionAndThis(Object, Object, Context, VarScope) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.getElemFunctionAndThis(Object, Object, Context, VarScope)
    use ScriptRuntime.getElemAndThis(Object, Object, Context, VarScope)
    org.htmlunit.corejs.javascript.ScriptRuntime.getElemFunctionAndThisOptional(Object, Object, Context, VarScope)
    use ScriptRuntime.getElemAndThisOptional(Object, Object, Context, VarScope)
    org.htmlunit.corejs.javascript.ScriptRuntime.getMessage(String, Object[])
    Use ScriptRuntime.getMessageById(String messageId, Object...args) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.getMessage0(String)
    Use ScriptRuntime.getMessageById(String messageId, Object...args) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.getMessage1(String, Object)
    Use ScriptRuntime.getMessageById(String messageId, Object...args) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.getMessage2(String, Object, Object)
    Use ScriptRuntime.getMessageById(String messageId, Object...args) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.getMessage3(String, Object, Object, Object)
    Use ScriptRuntime.getMessageById(String messageId, Object...args) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.getMessage4(String, Object, Object, Object, Object)
    Use ScriptRuntime.getMessageById(String messageId, Object...args) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.getNameFunctionAndThis(String, Context, VarScope)
    use ScriptRuntime.getNameAndThis(String, Context, VarScope)
    org.htmlunit.corejs.javascript.ScriptRuntime.getNameFunctionAndThisOptional(String, Context, VarScope)
    use ScriptRuntime.getNameAndThisOptional(String, Context, VarScope)
    org.htmlunit.corejs.javascript.ScriptRuntime.getObjectElem(Object, Object, Context)
    Use ScriptRuntime.getObjectElem(Object, Object, Context, VarScope) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.getObjectIndex(Object, double, Context)
    Use ScriptRuntime.getObjectIndex(Object, double, Context, VarScope) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.getObjectProp(Object, String, Context)
    Use ScriptRuntime.getObjectProp(Object, String, Context, VarScope) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.getObjectPropNoWarn(Object, String, Context)
    Use ScriptRuntime.getObjectPropNoWarn(Object, String, Context, VarScope) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.getPropFunctionAndThis(Object, String, Context)
    Use ScriptRuntime.getPropFunctionAndThis(Object, String, Context, VarScope) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.getPropFunctionAndThis(Object, String, Context, VarScope)
    Use ScriptRuntime.getPropAndThis(Object, String, Context, VarScope) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.getPropFunctionAndThisOptional(Object, String, Context, VarScope)
    Use ScriptRuntime.getPropAndThis(Object, String, Context, VarScope) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.getValueFunctionAndThis(Object, Context)
    Use ScriptRuntime.getValueAndThis(Object, Context) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.getValueFunctionAndThisOptional(Object, Context)
    Use ScriptRuntime.getValueAndThisOptional(Object, Context) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.lastStoredScriptable(Context)
    org.htmlunit.corejs.javascript.ScriptRuntime.nameIncrDecr(VarScope, String, int)
    Use ScriptRuntime.nameIncrDecr(VarScope, String, Context, int) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.newObjectLiteral(Object[], Object[], int[], Context, VarScope)
    Use ScriptRuntime.fillObjectLiteral(Scriptable, Object[], Object[], int[], Context, VarScope)
    org.htmlunit.corejs.javascript.ScriptRuntime.newObjectLiteral(Object[], Object[], Context, VarScope)
    Use ScriptRuntime.fillObjectLiteral(Scriptable, Object[], Object[], int[], Context, VarScope) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.propIncrDecr(Object, String, Context, int)
    Use ScriptRuntime.propIncrDecr(Object, String, Context, VarScope, int) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.refIncrDecr(Ref, Context, int)
    Use ScriptRuntime.refIncrDecr(Ref, Context, VarScope, int) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.refSet(Ref, Object, Context)
    Use ScriptRuntime.refSet(Ref, Object, Context, VarScope) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.setFunctionProtoAndParent(BaseFunction, VarScope)
    Use ScriptRuntime.setFunctionProtoAndParent(BaseFunction, Context, VarScope) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.setFunctionProtoAndParent(BaseFunction, VarScope, boolean)
    Use ScriptRuntime.setFunctionProtoAndParent(BaseFunction, Context, VarScope, boolean) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.setObjectElem(Object, Object, Object, Context)
    Use ScriptRuntime.setObjectElem(Object, Object, Object, Context, VarScope) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.setObjectIndex(Object, double, Object, Context)
    Use ScriptRuntime.setObjectIndex(Object, double, Object, Context, VarScope) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.setObjectProp(Object, String, Object, Context)
    Use ScriptRuntime.setObjectProp(Object, String, Object, Context, VarScope) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.specialRef(Object, String, Context)
    Use ScriptRuntime.specialRef(Object, String, Context, VarScope) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.toObject(Context, VarScope, Object, Class<?>)
    Use ScriptRuntime.toObject(Context, VarScope, Object) instead.
    org.htmlunit.corejs.javascript.ScriptRuntime.toObject(VarScope, Object, Class<?>)
    Use ScriptRuntime.toObject(VarScope, Object) instead.
    org.htmlunit.corejs.javascript.ScriptRuntime.toObjectOrNull(Context, Object)
    Use ScriptRuntime.toObjectOrNull(Context, Object, VarScope) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.typeError0(String)
    Use ScriptRuntime.typeErrorById(String messageId, Object...args) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.typeError1(String, Object)
    Use ScriptRuntime.typeErrorById(String messageId, Object...args) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.typeError2(String, Object, Object)
    Use ScriptRuntime.typeErrorById(String messageId, Object...args) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.typeError3(String, String, String, String)
    Use ScriptRuntime.typeErrorById(String messageId, Object...args) instead
    org.htmlunit.corejs.javascript.ScriptRuntime.typeErrorThrower()
    ScriptRuntime.typeErrorThrower(Context)
    org.htmlunit.corejs.javascript.SecurityController.execWithDomain(Context, VarScope, Script, Object)
    The application should not override this method and instead override SecurityController.callWithDomain(Object securityDomain, Context cx, Callable callable, VarScope scope, Scriptable thisObj, Object[] args).
    org.htmlunit.corejs.javascript.SlotMapOwner.getAttributes(int, Scriptable)
    Use SlotMapOwner.getAttributes(int index). The engine always ignored the start argument.
    org.htmlunit.corejs.javascript.SlotMapOwner.getAttributes(String, Scriptable)
    Use SlotMapOwner.getAttributes(String name). The engine always ignored the start argument.
    org.htmlunit.corejs.javascript.SlotMapOwner.setAttributes(int, Scriptable, int)
    Use SlotMapOwner.setAttributes(int index, int attributes). The engine always ignored the start argument.
    org.htmlunit.corejs.javascript.SlotMapOwner.setAttributes(String, Scriptable, int)
    Use SlotMapOwner.setAttributes(String name, int attributes). The engine always ignored the start argument.
    org.htmlunit.corejs.javascript.tools.debugger.Main.contextCreated(Context)
    The method is only present for compatibility and should not be called.
    org.htmlunit.corejs.javascript.tools.debugger.Main.contextEntered(Context)
    The method is only present for compatibility and should not be called.
    org.htmlunit.corejs.javascript.tools.debugger.Main.contextExited(Context)
    The method is only present for compatibility and should not be called.
    org.htmlunit.corejs.javascript.tools.debugger.Main.contextReleased(Context)
    The method is only present for compatibility and should not be called.
    org.htmlunit.corejs.javascript.tools.debugger.Main.setOptimizationLevel(int)
    The method does nothing and is only present for compatibility.
    org.htmlunit.corejs.javascript.tools.debugger.Main.setSize(Dimension)
    Use Main.setSize(int, int) instead.
    org.htmlunit.corejs.javascript.TopLevel.cacheBuiltins(TopLevel, boolean)
    org.htmlunit.corejs.javascript.typedarrays.NativeArrayBuffer.getBuffer()
    This method will return null for shared buffers and possibly other buffers in the future. Callers should use NativeArrayBuffer.getByteBuffer() instead.
    org.htmlunit.corejs.javascript.WrappedException.unwrap()
    Use WrappedException.getWrappedException() instead.
  • Deprecated Constructors
    Constructor
    Description
    org.htmlunit.corejs.javascript.Context()
    this constructor is deprecated because it creates a dependency on a static singleton context factory. Use ContextFactory.enter() or ContextFactory.call(ContextAction) instead. If you subclass this class, consider using Context(ContextFactory) constructor instead in the subclasses' constructors.
    org.htmlunit.corejs.javascript.EcmaError(Scriptable, String, int, int, String)
    EcmaError error instances should not be constructed explicitly since they are generated by the engine.
    org.htmlunit.corejs.javascript.IRFactory(CompilerEnvirons, String, ErrorReporter)
    org.htmlunit.corejs.javascript.JavaScriptException(Object)
    Use WrappedException(Throwable) to report exceptions in Java code.
    org.htmlunit.corejs.javascript.NativeJavaMethod(VarScope, Method, String)
    org.htmlunit.corejs.javascript.NativeJavaPackage(String)
    NativeJavaPackage is an internal class, do not use it directly.
    org.htmlunit.corejs.javascript.NativeJavaPackage(String, ClassLoader)
    NativeJavaPackage is an internal class, do not use it directly.

Copyright © 2026 HtmlUnit. All rights reserved.