Prepare the onions: Cut the onions rather than slicing or chopping them finely. Confit them in olive oil at a moderate temperature (120°C) for about 30 minutes, stirring occasionally.
Prepare the potatoes: Peel and cut the potatoes into 3-4 mm thick slices. Rinse to remove starch. After confiting the onions, use the same oil to cook the potatoes at a slightly higher temperature without exceeding 140-150°C, seasoning with salt, for about 15 minutes or until they start to soften.
Mix with eggs: Beat the eggs in a bowl and season with salt. Incorporate the cooled onions and potatoes. Ensure the mixture is not too liquid.
Cook the tortilla: In a non-stick pan (28 cm diameter) rubbed with a garlic clove and heated with a bit of olive oil, pour in the egg mixture. Cook over medium heat, shaking the pan to distribute the mixture and watching the edges. After about 5-6 minutes, when the edges solidify, flip the tortilla using a large flat plate and cook the other side.
Serve: Once cooked to your liking, remove from the pan, slice, and serve with a salad or as a sandwich filling.