Good joke but unrealistic. Chocolate bar is maybe new invented but cocoa isn’t. And I bet they knew how it works on humans best friend.
The dog would be fine. It takes a huge amount of chocolate to hurt a dog - I was freaking out once when my dog ate some chocolate but I learned that a 30 pound dog would have to eat an entire full-size Hershey’s Bar in order to experience any symptoms at all (and they would be mild and temporary).
Milk chocolate has very low toxicity for dogs, it’s the higher cacao content dark chocolate that is a real problem. Regarding onions, while the issue is common to all alliums, garlic is the most dangerous, with toxicity starting at just 5mg per kg

During a visit, my mother’s and my dog ate some chocolate cake that the wind blew off a table. We notice it in 10-15 mins, vet said just bring them to induce vomiting. We did that, they got an injection each, and vomited out everything soon.

In practice, vets want to take no risks by calculaing/guessing exact cocoa content, the best is just to have them vomit as soon as you can.

Which you can do at home if you need to with an eyedropper of Hydrogen Peroxide.