mozilla/pdf.js — Issue #891: navigator.mimeTypes and object tag
Author: gerds
Created: 2011-12-06 16:09:06+00:00
State: open

I don't know if this is the proper forum to ask this, since I am only vaguely familiar with pdf.js at this point.

But I was wondering if there will be any kind of entry in the navigator.mimeTypes array, like "application/pdf". This way a Javascript programmer can see that the browser is capable of displaying pdf documents.

Please note, I am not talking about some externally loaded script pdf.js, where the API is visible to Javascript from within a web page. I am talking about the Firefox addon, or even the case where pdf.js is built into the browser (in the future). In those cases, I do not see anything in the mimetypes array, or any other Javscript API that I can find.

Even the Chrome browser, with it's built in Chrome PDF viewer, has "application/pdf" in its mimeTpes array.

Also, I noticed that pdf's can display in a window and in frames, but not in object tags. Now granted, most people don't display pdf via object tags, but I was just wondering about this.

At any rate, I think the mimeTypes issue would be nice to resolve, so that a Javascripter can see that PDFs are displayable in the browser.

Thanks