Heat the oil in a large saucepan over medium heat. When the oil is hot, add the onions and cook, stirring occasionally, until dark brown but not burnt, 35 to 40 minutes.
Add the rice and cook, stirring continuously, 3 to 4 minutes.
Dissolve the salt in the water and pour it carefully over the rice, taking care as it may spatter.