Begin by slicing the onions into rings.
In a medium bowl, combine the flour, baking powder, and salt. Stir to combine. In another bowl, whisk together the eggs and milk. Chop up the coconut flakes (by hand or with a food processor) and place this on a large plate.
Dip the onion rings in the flour mixture, then in the egg mixture. Let them dry for a minute or two on a cooling rack. Then dip them into the coconut, coating all sides.
Heat enough oil so the rings will have room to float to around 350°F. Fry the onion rings for about 30 seconds on each side, using kitchen tongs to turn and remove them from the oil once done. Remove to a plate lined with paper towels to remove excess grease.
If you want to bake the onion rings, place them on one layer on a baking sheet lined with a baking mat or parchment paper. Bake at 400°F for about 20 minutes, turning once in the middle of the bake time. These actaully tasted more strongly of coconut than the fried version. I think these would make an awesome addition to a salad.