Merge pull request #2955 from vyv03354/warn_unsupported
Add a console warning when JavaScript/AcroForm/XFA was found
This commit is contained in:
commit
b7878c150b
@ -390,7 +390,8 @@
|
|||||||
if (!('console' in window)) {
|
if (!('console' in window)) {
|
||||||
window.console = {
|
window.console = {
|
||||||
log: function() {},
|
log: function() {},
|
||||||
error: function() {}
|
error: function() {},
|
||||||
|
warn: function() {}
|
||||||
};
|
};
|
||||||
} else if (!('bind' in console.log)) {
|
} else if (!('bind' in console.log)) {
|
||||||
// native functions in IE9 might not have bind
|
// native functions in IE9 might not have bind
|
||||||
@ -400,6 +401,9 @@
|
|||||||
console.error = (function(fn) {
|
console.error = (function(fn) {
|
||||||
return function(msg) { return fn(msg); };
|
return function(msg) { return fn(msg); };
|
||||||
})(console.error);
|
})(console.error);
|
||||||
|
console.warn = (function(fn) {
|
||||||
|
return function(msg) { return fn(msg); };
|
||||||
|
})(console.warn);
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
@ -1316,6 +1316,7 @@ var PDFView = {
|
|||||||
if (PDFView.supportsPrinting) {
|
if (PDFView.supportsPrinting) {
|
||||||
pdfDocument.getJavaScript().then(function(javaScript) {
|
pdfDocument.getJavaScript().then(function(javaScript) {
|
||||||
if (javaScript.length) {
|
if (javaScript.length) {
|
||||||
|
console.warn('Warning: JavaScript is not supported');
|
||||||
PDFView.fallback();
|
PDFView.fallback();
|
||||||
}
|
}
|
||||||
// Hack to support auto printing.
|
// Hack to support auto printing.
|
||||||
@ -1389,7 +1390,7 @@ var PDFView = {
|
|||||||
self.setTitle(pdfTitle + ' - ' + document.title);
|
self.setTitle(pdfTitle + ' - ' + document.title);
|
||||||
|
|
||||||
if (info.IsAcroFormPresent) {
|
if (info.IsAcroFormPresent) {
|
||||||
// AcroForm/XFA was found
|
console.warn('Warning: AcroForm/XFA is not supported');
|
||||||
PDFView.fallback();
|
PDFView.fallback();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user