This seemed like a complete impossibility to me, but it works.  And it works well.
Start off with a small amount of sugar in a pan - 1 teaspoon or so - on high; watch it carefully.  It will liquify then caramelize and fizzle.  Right when it's caramelized, throw in 3 onions (cut against the grain into 1/2 rings) and stir them around.  Add a few Tablespoons of butter and a pinch of baking soda.  Finally, add some water (a 1/2 cup to 1 cup), deglaze, and turn it down.  Keep cooking until the water is evaporated, stirring occasionally.