Open aeberhardo opened 8 years ago
Thanks for bringing this up, we should add some polyfills there I suppose.
I was looking into this issue, but it seems that both console.warn
and console.error
are supported in all browsers staring from IE8 and newer. So I think this is is no issue anymore (jsoneditor supports IE9 and newer).
https://developer.mozilla.org/en-US/docs/Web/API/Console/error#Browser_compatibility https://developer.mozilla.org/en-US/docs/Web/API/Console/warn#Browser_compatibility
If jsoneditor is used in some application that requires compatibility with really old browsers, you can always load polyfills yourself.
In version 5.5.6 there are many instances of
console.warn(..)
andconsole.error(..)
. This can be problematic in browsers that don't support theconsole
object like IE11: an "undefined object" error will be thrown potentially breaking the jsoneditor integration.Before trying to log to the console I suggest checking for the existence of the
console
object.Another option would be something like the following script by HTML5Boilderplate.com: https://github.com/h5bp/html5-boilerplate/blob/master/dist/js/plugins.js (it might be a bit too intrusive in the context of an JSON editor though).