josdejong / josdejong/jsoneditor

Avoid "console" errors in browsers that lack a console

Open
#319 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
12.3k
Forks
2.1k
PR merge metrics
No merged PRs in 30d

Description

In version 5.5.6 there are many instances of `console.warn(..)` and `console.error(..)`.
This can be problematic in browsers that don't support the `console` 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).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.