mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-24 08:08:15 -05:00
IE10 compatibility: adding console.debug
Support for console.debug was added in IE11 http://msdn.microsoft.com/en-us/library/ie/dn265066(v=vs.85).aspx
This commit is contained in:
parent
73e49f9972
commit
b3a841e814
1 changed files with 6 additions and 0 deletions
|
@ -20,6 +20,7 @@ definitionSchemas =
|
||||||
'misc': require './schemas/definitions/misc'
|
'misc': require './schemas/definitions/misc'
|
||||||
|
|
||||||
init = ->
|
init = ->
|
||||||
|
setupConsoleLogging()
|
||||||
watchForErrors()
|
watchForErrors()
|
||||||
setUpIOSLogging()
|
setUpIOSLogging()
|
||||||
path = document.location.pathname
|
path = document.location.pathname
|
||||||
|
@ -86,6 +87,11 @@ initializeServices = ->
|
||||||
service = require service
|
service = require service
|
||||||
service()
|
service()
|
||||||
|
|
||||||
|
setupConsoleLogging = ->
|
||||||
|
unless console.debug
|
||||||
|
# Needed for IE10 and earlier
|
||||||
|
console.debug = console.log
|
||||||
|
|
||||||
watchForErrors = ->
|
watchForErrors = ->
|
||||||
currentErrors = 0
|
currentErrors = 0
|
||||||
window.onerror = (msg, url, line, col, error) ->
|
window.onerror = (msg, url, line, col, error) ->
|
||||||
|
|
Loading…
Reference in a new issue