summaryrefslogtreecommitdiffstats
path: root/WebContent/VAADIN/vaadinBootstrap.js
diff options
context:
space:
mode:
Diffstat (limited to 'WebContent/VAADIN/vaadinBootstrap.js')
-rw-r--r--WebContent/VAADIN/vaadinBootstrap.js18
1 files changed, 13 insertions, 5 deletions
diff --git a/WebContent/VAADIN/vaadinBootstrap.js b/WebContent/VAADIN/vaadinBootstrap.js
index 61783c448e..b61c10dcf7 100644
--- a/WebContent/VAADIN/vaadinBootstrap.js
+++ b/WebContent/VAADIN/vaadinBootstrap.js
@@ -5,11 +5,19 @@
var widgetsets = {};
- var log = function() {
- if (console && console.log) {
- console.log(arguments);
- }
- }
+ var log;
+ if (typeof console === "undefined") {
+ //If no console.log present, just use a no-op
+ log = function() {};
+ } else if (typeof console.log === "function") {
+ //If it's a function, use it with apply
+ log = function() {
+ console.log.apply(console, arguments);
+ };
+ } else {
+ //In IE, its a native function for which apply is not defined, but it works without a proper 'this' reference
+ log = console.log;
+ }
var loadTheme = function(url) {
if(!themesLoaded[url]) {