Melt butter in a large skillet over medium heat. Add cabbage and onions, sprinkle with salt and pepper, and cook, stirring often, until very soft, about 45 minutes. You may have to reduce the heat during the last 15 minutes. Let cool.
For the batter
Preheat oven to 375°F. Butter an 8x8-inch baking pan.
In a medium bowl, stir together eggs, sour cream, and mayonnaise until smooth. Add baking powder, flour, and salt and stir until you have a smooth batter.
For assembly
Spread half the batter on the bottom of the prepared pan. Add cabbage filling, spreading to form an even layer. Add remaining batter and spread to cover cabbage completely.