The first person to port LaTeX to WASM will be hailed as the messiah.
In any case, the sheer size of LaTeX will make such an endeavour probably not very useful (Download 1 GiB to render a document? Probably not.)
Any day now we'll be downloading 1 GB in order to read an article, so just give it time …
http://manuels.github.io/texlive.js/
See previous story: https://news.ycombinator.com/item?id=5083361
But, do you want to render a resulting .pdf? If it's going into a canvas, I can see it taking some serious work.
(I think I did never write something as hard to parse for lay-people for explaining so simple an idea. There's something very wrong with the above comment.)
Check network inspector tab texlive-full.js - 2.4Gb.