Because why introduce a custom abstraction to implement something with an imperative scripting language when you can achieve the same result with a declarative language built specifically to address this use case?
You'd rather maintain all the maths and JS dependencies for this than have browsers just render what you want?
You'd rather maintain all the maths and JS dependencies for this than have browsers just render what you want?