Search in sources :

Example 1 with HybridObject

use of org.apache.sling.scripting.sightly.js.impl.rhino.HybridObject in project sling by apache.

the class SlyBindingsValuesProvider method addBinding.

private void addBinding(Context context, Function factory, Bindings bindings, String globalName, Object qInstance) {
    if (factory == null) {
        return;
    }
    Object result = factory.call(context, factory, factory, new Object[] { bindings, qInstance });
    HybridObject global = new HybridObject((Scriptable) result, jsValueAdapter);
    bindings.put(globalName, global);
}
Also used : HybridObject(org.apache.sling.scripting.sightly.js.impl.rhino.HybridObject) ScriptableObject(org.mozilla.javascript.ScriptableObject) HybridObject(org.apache.sling.scripting.sightly.js.impl.rhino.HybridObject)

Aggregations

HybridObject (org.apache.sling.scripting.sightly.js.impl.rhino.HybridObject)1 ScriptableObject (org.mozilla.javascript.ScriptableObject)1