Tomatoes are fine. With onions, are you talking raw or cooked? I think you will find they won't have much interest in them raw. But a few weeks ago we had some leftover cooked onion in long strips and I threw it out for them with the rest of the scraps for that day. That first day they ate around them and the other scraps disappeared, leaving just the onion. About 36 hours passed, during which time apparently they had time to mature and become palatable. First one wandered over and tried one. The others, deciding that she had just discovered a new treat, wrestled her for it. Before long they were all there trying to find the best bits from among the "treats" they had so disdainfully walked around for the past two days. Go figure. Anyway, I did not notice any difference in the flavor of the eggs in the days following.