[1] https://www.zotero.org/download/
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.