Zotero's V7 reader is great, built on pdfjs (Mozillas pdf reader) and adds neat things like notations and dark mode.
It feels a bit dated sometimes, but I'm yet to find anything that comes close.
PDFjs was written in JS from day one, and (as far as I know) was not based on any previous PDF reader.
BTW, I didn't mean they necessarily used the actual Foxit code, but it was a starting point maybe reimplemented in JS.