public static void putProperty(Scriptable obj, int index, Object value)
    {
        Scriptable base = getBase(obj, index);
        if (base == null)
            base = obj;
        base.put(index, obj, value);
    }
public static void putProperty ( Scriptable obj , int index , Object value ) { Scriptable base = getBase ( obj , index ) ; if ( base == null ) base = obj ; base . put ( index , obj , value ) ; }
Puts an indexed property in an object or in an object in its prototype chain.
<p>
Searches for the indexed property in the prototype chain. If it is found,
the value of the property in <code>obj</code> is changed through a call
to {@link Scriptable#put(int, Scriptable, Object)} on the prototype
passing <code>obj</code> as the <code>start</code> argument. This allows
the prototype to veto the property setting in case the prototype defines
the property with [[ReadOnly]] attribute. If the property is not found,
it is added in <code>obj</code>.
@param obj a JavaScript object
@param index a property index
@param value any JavaScript value accepted by Scriptable.put
@since 1.5R2