Combine the milk with the ricotta cheese in a bowl and mix until blended. Add the whole eggs and then the egg whites, one at a time, whisking well after each addition. Stir in the Parmesan cheese and pepper.
In a 25cm non-stick frying pan, heat the oil over moderate heat. Add the onions and cook, stirring, for 8–10 minutes or until soft and golden brown. Add the ham to the pan and cook, stirring, for a few more minutes.
Spread the ham and onion mixture evenly in the pan. Reduce the heat to low. Pour the egg and milk mixture into the pan and sprinkle over the mozzarella cheese.
Cover and cook for 15–20 minutes or until the frittata is set and puffed. Transfer to a serving plate, cut into wedges and serve.