This functionality is available in internal API of JSObject as defineGetter() and defineSetter() methods. Request was motivated by bug 61343.