Mix well and cook over moderate heat until mixture starts to thicken (about 20 minutes).
Stir in onion and pineapple. Continue cooking over moderate heat (20 to 25 min) until mixture is as thick as desired.