On https://github.com/mozilla/pdf.js/wiki/Required-Browser-Features we mention required browser features for PDF.js, but I have the feeling that not all of them are necessary nowadays since we moved to using more modern features over the years. Moreover, as indicated in https://github.com/mozilla/pdf.js/issues/11950#issuecomment-637149085, some features may be missing such as range requests or `async/await`.

In short, we should verify which are still necessary and update the wiki page and the automated feature detection if possible.
*
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
onmessage = function (e) {
  var data = e.data;
  switch (data.action) {
  case 'test':
    postMessage({action: 'test', result: data.data instanceof Uint8Array});
    break;
  case 'test-transfers':
    postMessage({action: 'test-transfers', result: data.data[0] === 255});
    break;
  case 'xhr':
    var xhr = new XMLHttpRequest();
    var responseExists = 'response' in xhr;
    
    try {
      var dummy = xhr.responseType;
    } catch (e) {
      responseExists = false;
    }
    postMessage({action: 'xhr', result: responseExists});
    break;
  }
};