Preheat oven to 350 degrees
Melt butter in a skillet, add onions and cook over medium heat until they caramelize and have reached a golden tone. Beat the eggs and slowly add the cream, sugar, salt, baking powder and flour. Mix well.
Stir in the onion butter mixture. Pour into a buttered 9 by 13-inch pyrex dish. Bake for 45 minutes