mathjazz/pontoon — comment on commit f816f435925e5de3b6d0df572ea995233f68c700
File: client/lib/js/pontoon.js line 407
By samastur:

Well, snippet is a bit small so I might interpretation of what you try to do may be wrong, but if you want to get DOCTYPE of a document, then why not just fetch it with XMLHttpRequest, read responseText and slice off everything after ?