Crack the eggs into a bowl and beat them well.
Finely chop the onion and green onion.
Heat cooking oil in a pan over medium heat.
Stir-fry the onion and green onion first.
Pour in the beaten eggs and scramble as they cook.
Season with salt and pepper to taste.
Transfer the finished egg stir-fry to a serving dish.