()
| 265 | } |
| 266 | |
| 267 | var setupConsoleLogging = function () { |
| 268 | // IE9 doesn't expose console object unless debugger tools are loaded |
| 269 | if (typeof console === 'undefined' || console === null) { |
| 270 | window.console = { |
| 271 | info () {}, |
| 272 | log () {}, |
| 273 | error () {}, |
| 274 | debug () {} |
| 275 | } |
| 276 | } |
| 277 | if (!console.debug) { |
| 278 | // Needed for IE10 and earlier |
| 279 | return console.debug = console.log |
| 280 | } |
| 281 | } |
| 282 | |
| 283 | var watchForErrors = function () { |
| 284 | let currentErrors = 0 |