Package org.apache.sling.scripting.javascript.helper
package org.apache.sling.scripting.javascript.helper
-
ClassDescriptionThe
SlingContext
extends Context to overwrite theSlingContext.initStandardObjects(ScriptableObject, boolean)
method to add more standard objects.TheSlingContextFactory
extends the standard Rhino ContextFactory to provide customized settings, such as having the dynamic scope feature enabled by default.TheSlingGlobal
class provides two interesting new global functions which are not part of the ECMAScript standard but which are available in the Rhino Shell and which may be of use by JavaScripts:print(args, ...)
Prints the argumentsargs
in a single message to the scripts logger available as the global log variable.load(args, ...)
Loads the scripts named as parameters into the current scope one, after the other.