Emerald crabs are a type of spider crab (along with arrow crabs and decorator crabs) emerald crabs are mainly herbavourous however all crabs in general are oportunistic feeders. If it comes across a small fish that is dieing or in the corner of the tank having a rough time, it will make an attempt at catching it. I have seen large emerald crabs do this (over 1 inch in diameter at just the body not the legs). It used its legs to act like a cage as it sat ontop of the fish, pinning it to the ground. The damsel was on its way out anyway so it just acted like a premptive clean-up crew for the body. It was an unusual sight to see, an emerald crab lunge at a fish and catch it.
This behavior is normal for all crabs as even large hermits will definetly eat a fish if given the chance. However Emerald crabs are to slow to catch a healthy fish and the smaller ones a very fish safe. Its only when they get large they get agressive, possibly from sexual maturity.