Package org.apache.sling.scripting.javascript.helper

# Class SlingContext

java.lang.Object
org.mozilla.javascript.Context
org.apache.sling.scripting.javascript.helper.SlingContext

public class SlingContext extends org.mozilla.javascript.Context
The `SlingContext` extends Context to overwrite the `initStandardObjects(ScriptableObject, boolean)` method to add more standard objects.

## Nested Class Summary

## Nested classes/interfaces inherited from class org.mozilla.javascript.Context

`org.mozilla.javascript.Context.ClassShutterSetter`

## Field Summary

### Fields inherited from class org.mozilla.javascript.Context

`emptyArgs, errorReporterProperty, FEATURE_DYNAMIC_SCOPE, FEATURE_E4X, FEATURE_ENHANCED_JAVA_ACCESS, FEATURE_LOCATION_INFORMATION_IN_ERROR, FEATURE_MEMBER_EXPR_AS_FUNCTION_NAME, FEATURE_NON_ECMA_GET_YEAR, FEATURE_PARENT_PROTO_PROPERTIES, FEATURE_PARENT_PROTO_PROPRTIES, FEATURE_RESERVED_KEYWORD_AS_IDENTIFIER, FEATURE_STRICT_EVAL, FEATURE_STRICT_MODE, FEATURE_STRICT_VARS, FEATURE_TO_STRING_AS_SOURCE, FEATURE_V8_EXTENSIONS, FEATURE_WARNING_AS_ERROR, generateObserverCount, languageVersionProperty, VERSION_1_0, VERSION_1_1, VERSION_1_2, VERSION_1_3, VERSION_1_4, VERSION_1_5, VERSION_1_6, VERSION_1_7, VERSION_1_8, VERSION_DEFAULT, VERSION_ES6, VERSION_UNKNOWN`

## Constructor Summary

Constructors
Constructor
Description
`SlingContext()`

## Method Summary

Modifier and Type
Method
Description
`org.mozilla.javascript.ScriptableObject`
`initStandardObjects(org.mozilla.javascript.ScriptableObject scope, boolean sealed)`

### Methods inherited from class org.mozilla.javascript.Context

`addActivationName, addContextListener, addPropertyChangeListener, call, call, callFunctionWithContinuations, captureContinuation, checkLanguageVersion, checkOptimizationLevel, compileFunction, compileReader, compileReader, compileString, createClassLoader, decompileFunction, decompileFunctionBody, decompileScript, enter, enter, evaluateReader, evaluateString, executeScriptWithContinuations, exit, getApplicationClassLoader, getClassShutterSetter, getCurrentContext, getDebuggableView, getDebugger, getDebuggerContextData, getE4xImplementationFactory, getElements, getErrorReporter, getFactory, getImplementationVersion, getInstructionObserverThreshold, getLanguageVersion, getLocale, getMaximumInterpreterStackDepth, getOptimizationLevel, getThreadLocal, getUndefinedValue, getWrapFactory, hasFeature, initSafeStandardObjects, initSafeStandardObjects, initSafeStandardObjects, initStandardObjects, initStandardObjects, isActivationNeeded, isGeneratingDebug, isGeneratingDebugChanged, isGeneratingSource, isSealed, isValidLanguageVersion, isValidOptimizationLevel, javaToJS, jsToJava, newArray, newArray, newObject, newObject, newObject, observeInstructionCount, putThreadLocal, removeActivationName, removeContextListener, removePropertyChangeListener, removeThreadLocal, reportError, reportError, reportRuntimeError, reportRuntimeError, reportWarning, reportWarning, reportWarning, resumeContinuation, seal, setApplicationClassLoader, setCachingEnabled, setClassShutter, setDebugger, setErrorReporter, setGenerateObserverCount, setGeneratingDebug, setGeneratingSource, setInstructionObserverThreshold, setLanguageVersion, setLocale, setMaximumInterpreterStackDepth, setOptimizationLevel, setSecurityController, setWrapFactory, stringIsCompilableUnit, throwAsScriptRuntimeEx, toBoolean, toNumber, toObject, toObject, toString, toType, unseal`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### SlingContext

public SlingContext()

## Method Details

### initStandardObjects

public org.mozilla.javascript.ScriptableObject initStandardObjects(org.mozilla.javascript.ScriptableObject scope, boolean sealed)

Overrides:
  `initStandardObjects` in class `org.mozilla.javascript.Context`