I occasionally give my dogs very small pieces of things that I know are safe for them to eat. We don't get carried away with table scraps at our house, and that way we minimize any potential problem. In addition, there is also a rare form of anemia, Heinz-body hemolytic anemia, that dogs can get from eating cooked or raw onions or other members of the onion family. Because it is so rare, it can be misdiagnosed. This was thought to affect only dogs 40 lbs.
Onion powder is very bad for cats, too.
There is a good article on onion toxicity here . The avidin in egg whites will tie up the biotin so it cannot be used by the dog. These should not be given to your dog because of the risk of salmonella poisoning. Dogs do not get e coli or salmonella poisoning easily, but it can happen in some rare instances. If your dog has a partial blockage in their intestines where food can be trapped, e coli or salmonella will have a breeding ground.