Peel the red onions and thinly slice into rings; use a mandoline if you've got one.
Heat the oil in a medium skillet over medium-low heat. Add the sliced onions and sweat until they begin to soften and turn translucent but do not brown, 10 to 15 minutes.
Add the sugar and vinegar and cook overĀ very low heat until the liquid evaporates entirely and the jam is thick and sticky, about 10 minutes.
Take the jam off the heat and stir in the salt.
Portion the jam out into jars. Keep refrigerated and eat within two weeks.