Prepare the eggs by whisking them.
Finely chop the onion and green onion.
Heat oil in a pan and sauté the onion and green onion.
Add the eggs and scramble them.
Add the rice and stir-fry evenly.
Season with soy sauce and salt.
Serve on a plate to finish.