Tony G commented
Rhino was deprecated years ago. It's replacement, Nashorn, has even come and gone. Nashorn is available as an addin. But I believe the Graal JS engine would be the best switchable alternative to V8.
Bill Crews commented