Skip to content

Commit 6b41f15

Browse files
committed
For #11961: collect telemetry on all unique unsupported features that trigger fallback error.
This expands upon the telemetry we are collecting that shows the fallback error.
1 parent c9934de commit 6b41f15

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

web/app.js

+15
Original file line numberDiff line numberDiff line change
@@ -869,6 +869,13 @@ const PDFViewerApplication = {
869869
typeof PDFJSDev === "undefined" ||
870870
PDFJSDev.test("MOZCENTRAL || GENERIC")
871871
) {
872+
if (featureId) {
873+
this.externalServices.reportTelemetry({
874+
type: "unsupportedFeature",
875+
featureId,
876+
});
877+
}
878+
872879
// For PDFs that contain script and form errors, we should only trigger
873880
// the fallback once the user has interacted with the page.
874881
if (this._delayedFallbackFeatureIds.length >= 1 && this._hasInteracted) {
@@ -1247,6 +1254,10 @@ const PDFViewerApplication = {
12471254
}
12481255
console.warn("Warning: JavaScript is not supported");
12491256
this._delayedFallbackFeatureIds.push(UNSUPPORTED_FEATURES.javaScript);
1257+
this.externalServices.reportTelemetry({
1258+
type: "unsupportedFeature",
1259+
featureId: UNSUPPORTED_FEATURES.javaScript,
1260+
});
12501261
return true;
12511262
});
12521263

@@ -1329,6 +1340,10 @@ const PDFViewerApplication = {
13291340
if (info.IsAcroFormPresent) {
13301341
console.warn("Warning: AcroForm/XFA is not supported");
13311342
this._delayedFallbackFeatureIds.push(UNSUPPORTED_FEATURES.forms);
1343+
this.externalServices.reportTelemetry({
1344+
type: "unsupportedFeature",
1345+
featureId: UNSUPPORTED_FEATURES.forms,
1346+
});
13321347
}
13331348

13341349
if (

0 commit comments

Comments
 (0)