code: @SuppressWarnings("static-access")
  	public static Object bindings(Context cx, Scriptable thisObj, Object[] args,
              Function funObj) {
          if (args.length == 1) {
              Object arg = args[0];
              if (arg instanceof Wrapper) {
                  arg = ((Wrapper)arg).unwrap();
              }
              if (arg instanceof ExternalScriptable) {
                  ScriptContext ctx = ((ExternalScriptable)arg).getContext();
                  Bindings bind = ctx.getBindings(ScriptContext.ENGINE_SCOPE);
                  return Context.javaToJS(bind,
                             ScriptableObject.getTopLevelScope(thisObj));
              }
          }
          return cx.getUndefinedValue();
      }
docs: The bindings function takes a JavaScript scope object
  of type ExternalScriptable and returns the underlying Bindings
  instance.
  
  var page = scope(pageBindings);
  with (page) {
  // code that uses page scope
  }
  var b = bindings(page);
  // operate on bindings here.