When it comes to responsiveness, raw compute throughput (the thing you get most out of say, vectorized C++) is not especially important. You care about latency and JavaScript can provide good latency if it's been JITted. If part of your flow is already in JavaScript, porting more to JS can actually improve latency because it cuts native<->JS transitions out of the call stack, so you're running less code in total even if the code you run is a bit slower (due to being JS instead of C++).
In general Chrome and Firefox have both moved a lot of stuff from C++ to JS (this is referred to as 'self-hosting') because it allows inlining across more calls and eliminates native<->JS transition overhead.