Heat the oil in a pan over medium heat.
Add the onions and water and cook until completely tender and caramelized and golden, about 40-50 minutes, adding more water as needed.
Stir in the maple syrup and vinegar and cook until most of the liquid is gone, about 2-3 minutes.
