Javascript 错误[对象BlobConstructor]';不是safari中的构造函数

Javascript 错误[对象BlobConstructor]';不是safari中的构造函数,javascript,angularjs,safari,blob,Javascript,Angularjs,Safari,Blob,我在Windows7中的safari中的本节中遇到此错误 '[object BlobConstructor]' is not a constructor (evaluating 'new Blob([data], {type: 'application/pdf'})') 在使用溶液后 我正在使用这个Blobcode var file = new Blob([data], {type: 'application/pdf'}); 完整的代码是 $scope.pdffile = "";

我在Windows7中的safari中的本节中遇到此错误

'[object BlobConstructor]' is not a constructor (evaluating 'new Blob([data], {type: 'application/pdf'})')
在使用溶液后

我正在使用这个
Blob
code

var file = new Blob([data], {type: 'application/pdf'});
完整的代码是

      $scope.pdffile = "";
      $http.get('/api/myurl/'+report_id, {responseType: 'arraybuffer'})
         .success(function (data) {
             var file = new Blob([data], {type: 'application/pdf'});
             var fileURL = URL.createObjectURL(file);
             $scope.pdfcontent = $sce.trustAsResourceUrl(fileURL);
             $scope.pdffile = "download.pdf";
             $scope.loading = false;
      });
苹果在2012年推出了Safari 6


显然,您使用的是版本5的哪个Blob API。

有解决此问题的方法吗?
      $scope.pdffile = "";
      $http.get('/api/myurl/'+report_id, {responseType: 'arraybuffer'})
         .success(function (data) {
             var file = new Blob([data], {type: 'application/pdf'});
             var fileURL = URL.createObjectURL(file);
             $scope.pdfcontent = $sce.trustAsResourceUrl(fileURL);
             $scope.pdffile = "download.pdf";
             $scope.loading = false;
      });