You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
We have a problem using compatibility.js caused by the absence of a local context to the file and by the use of 'use strict' directive.
The problem is really simple: the file starts with 'use strict' without creating a local context. In our application we minify all the external dependencies in a single file and because of compatibility.js every file minified after it is in its 'use strict' context.
This is not the correct behaviour (and, in our case, fires blocking exceptions) and has been already solved in the other js files of this repository (pdf.js, pdf.worker.js, pdf.combined.js, pdf_viewer.js) which starts with the following lines:
(function pdfjsWrapper() {
// Use strict in our context only - users might not want it
'use strict';
compatibility.js instead starts simply with:
'use strict';
So also compatibility.js should have a local context. I can do a pr if it helps.
Thanks,
McGio
The text was updated successfully, but these errors were encountered:
Hi,
We have a problem using compatibility.js caused by the absence of a local context to the file and by the use of 'use strict' directive.
The problem is really simple: the file starts with 'use strict' without creating a local context. In our application we minify all the external dependencies in a single file and because of compatibility.js every file minified after it is in its 'use strict' context.
This is not the correct behaviour (and, in our case, fires blocking exceptions) and has been already solved in the other js files of this repository (pdf.js, pdf.worker.js, pdf.combined.js, pdf_viewer.js) which starts with the following lines:
compatibility.js instead starts simply with:
So also compatibility.js should have a local context. I can do a pr if it helps.
Thanks,
McGio
The text was updated successfully, but these errors were encountered: