Heat some oil in a Teflon pan. Add the onions and simmer over medium heat for about 30 minutes until the onions are reduced and caramelized. Stir quite often.
Add sambal oelek, chilli flakes, sugar and ginger, bring to the boil for 2 minutes. Add soy sauce, ketjap manis, and fish sauce, stir vigorously. Add enough water to achieve the desired consistency.
This spicy-sweet onion jam is said to be quite thick. It has long been one of my favorite sauces and also tastes great with bratwurst or other meat dishes.