@@ -864,11 +864,24 @@ const PDFViewerApplication = {
864
864
. catch ( downloadByUrl ) ; // Error occurred, try downloading with the URL.
865
865
} ,
866
866
867
+ _recordFallbackErrorTelemetry ( featureId ) {
868
+ if ( typeof PDFJSDev === "undefined" || PDFJSDev . test ( "MOZCENTRAL" ) ) {
869
+ this . externalServices . reportTelemetry ( {
870
+ type : "unsupportedFeature" ,
871
+ featureId,
872
+ } ) ;
873
+ }
874
+ } ,
875
+
867
876
fallback ( featureId ) {
868
877
if (
869
878
typeof PDFJSDev === "undefined" ||
870
879
PDFJSDev . test ( "MOZCENTRAL || GENERIC" )
871
880
) {
881
+ if ( featureId ) {
882
+ this . _recordFallbackErrorTelemetry ( featureId ) ;
883
+ }
884
+
872
885
// For PDFs that contain script and form errors, we should only trigger
873
886
// the fallback once the user has interacted with the page.
874
887
if ( this . _delayedFallbackFeatureIds . length >= 1 && this . _hasInteracted ) {
@@ -1247,6 +1260,7 @@ const PDFViewerApplication = {
1247
1260
}
1248
1261
console . warn ( "Warning: JavaScript is not supported" ) ;
1249
1262
this . _delayedFallbackFeatureIds . push ( UNSUPPORTED_FEATURES . javaScript ) ;
1263
+ this . _recordFallbackErrorTelemetry ( UNSUPPORTED_FEATURES . javaScript ) ;
1250
1264
return true ;
1251
1265
} ) ;
1252
1266
@@ -1329,6 +1343,7 @@ const PDFViewerApplication = {
1329
1343
if ( info . IsAcroFormPresent ) {
1330
1344
console . warn ( "Warning: AcroForm/XFA is not supported" ) ;
1331
1345
this . _delayedFallbackFeatureIds . push ( UNSUPPORTED_FEATURES . forms ) ;
1346
+ this . _recordFallbackErrorTelemetry ( UNSUPPORTED_FEATURES . forms ) ;
1332
1347
}
1333
1348
1334
1349
if (
0 commit comments