Heat 2 tablespoons of the olive oil in a 12-inch non-stick or cast iron skillet. Add the onions and saute' on medium heat until caramelized to a golden brown but not burnt, about 10-12 minutes.
In a separate bowl, whisk the eggs lightly, then season with sea salt and freshly ground black pepper. Add the rosemary leaves and give it one more quick stir.
Scrape the caramelized onions into the bowl and stir to combine.
Wipe the skillet clean and add the remaining 1/2 tablespoon olive oil. Reduce heat to low. Pour the egg and onion mixture back into the skillet and cook for about 8 minutes, or until the eggs are no longer runny.
Turn broiler on low and place rack on center position. If your oven does not have a low broil setting, then place rack on one position below center.
Place the frittata in the oven just for one or two minutes. This will allow the top to puff and brown. Be sure to watch the frittata to prevent top from burning or becoming tough.
To serve, gently slide a spatula underneath the frittata to loosen it and turn out to a warm plate. Or just cut in the pan and serve directly from there.
Frittatas make great leftovers but for best taste, eat within one or two days.