In onions, all parts of the plant contain toxic compounds to dogs. This includes the flesh, skin, leaves, and even the juice. The toxic compounds in onions, specifically N-propyl disulfide, and thiosulphate, can cause damage to a dog's red blood cells and lead to a condition known as hemolytic anemia. It is crucial to keep all parts of onions away from dogs and avoid feeding them any foods that contain onions to prevent potential health issues.