Ah, now I see it's all in https://github.com/microsoft/markitdown/blob/main/src/markit... – beautifulsoup for htmlish stuff, pdfminer for pdf's, docx via mammoth. (And compared to pandoc, it only outputs markdown and has way fewer options.)
On a similar note, pandoc now can run completely browser-side, very bare-bones demo at https://tweag.github.io/pandoc-wasm/ (try -f html -t markdown and type in some html)