Yes. Onions are acceptable in meals, when they have been cooked.

To eat them raw is abominable, like a monster.