Put the cabbage in a large heatproof bowl. Put the onion in a saucepan with the vinegar, sugar and juniper berries. Heat until the mixture is boiling and the onion is starting to soften, around 10 mins. Add the mixture to the cabbage, stir well and leave to cool completely. Chill until needed.