Work in 5 dl of the flour, half of the butter, the milk, sugar, salt and egg, and beat thoroughly for 2 minutes.
Add enough flour to make a firm dough, knead it, then let it rise in an oiled bowl, covered with a kitchen towel, in a warm place until doubled (about 1 hour).
Mix the onion with the remaining melted butter - this is the filling.
Knead the dough again, roll it out into a 50x20 cm rectangle, and cut into four 50x5 cm strips.
Spread filling on each strip, fold lengthwise in half, twist two strips around each other, then twist the two double strips together again and shape into a circle on a greased baking sheet.
Cover with a kitchen towel and let it rise until doubled again.
Brush the top with beaten egg and sprinkle with chili powder.