diff options
author | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2014-09-01 08:34:00 +0200 |
---|---|---|
committer | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2014-09-01 13:57:36 +0200 |
commit | db9e2b8b789159fddf2562ca356d773d71afcc58 (patch) | |
tree | ca7ef940d16d864490fd133040915e36eb537ed1 /simpleSigning | |
parent | f0848a4559fcad29ca1f4b2d09f1f1417224248e (diff) | |
download | einfach-signieren-db9e2b8b789159fddf2562ca356d773d71afcc58.tar.gz einfach-signieren-db9e2b8b789159fddf2562ca356d773d71afcc58.tar.bz2 einfach-signieren-db9e2b8b789159fddf2562ca356d773d71afcc58.zip |
IE Bug fixes ...
Diffstat (limited to 'simpleSigning')
-rw-r--r-- | simpleSigning/src/main/resources/js/pdfas.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/simpleSigning/src/main/resources/js/pdfas.js b/simpleSigning/src/main/resources/js/pdfas.js index d058bec..1017fee 100644 --- a/simpleSigning/src/main/resources/js/pdfas.js +++ b/simpleSigning/src/main/resources/js/pdfas.js @@ -301,6 +301,27 @@ var jqueryRegistration = function() { //window.addEventListener("message", pdfAs.messageHandler, false); }; +/** + * Protect window.console method calls, e.g. console is not defined on IE + * unless dev tools are open, and IE doesn't define console.debug + */ +(function() { + if (!window.console) { + window.console = {}; + } + // union of Chrome, FF, IE, and Safari console methods + var m = [ + "log", "info", "warn", "error", "debug", "trace", "dir", "group", + "groupCollapsed", "groupEnd", "time", "timeEnd", "profile", "profileEnd", + "dirxml", "assert", "count", "markTimeline", "timeStamp", "clear" + ]; + // define undefined methods as noops to prevent errors + for (var i = 0; i < m.length; i++) { + if (!window.console[m[i]]) { + window.console[m[i]] = function() {}; + } + } +})(); jqueryRegistration(); |