If you're using JS to prehash before submission, an attacker who has exfiltrated hashes never needs to crack them. It also makes it impossible to degrade gracefully for a non-JS client. You're effectively taking a password hash and turning it into an unhashed password itself.