mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-28 01:55:38 -05:00
Fix IE9 missing console object
Debugging IE9 without debugging tools, when the debugging tools are kind of the problem. Fun.
This commit is contained in:
parent
795e58778c
commit
343ad28761
2 changed files with 14 additions and 0 deletions
|
@ -77,6 +77,13 @@ initializeUtilityServices = ->
|
||||||
require('core/services/segmentio')()
|
require('core/services/segmentio')()
|
||||||
|
|
||||||
setupConsoleLogging = ->
|
setupConsoleLogging = ->
|
||||||
|
# IE9 doesn't expose console object unless debugger tools are loaded
|
||||||
|
unless console?
|
||||||
|
window.console =
|
||||||
|
info: ->
|
||||||
|
log: ->
|
||||||
|
error: ->
|
||||||
|
debug: ->
|
||||||
unless console.debug
|
unless console.debug
|
||||||
# Needed for IE10 and earlier
|
# Needed for IE10 and earlier
|
||||||
console.debug = console.log
|
console.debug = console.log
|
||||||
|
|
|
@ -19,6 +19,13 @@ class CocoModel extends Backbone.Model
|
||||||
@on 'error', @onError, @
|
@on 'error', @onError, @
|
||||||
@on 'add', @onLoaded, @
|
@on 'add', @onLoaded, @
|
||||||
@saveBackup = _.debounce(@saveBackup, 500)
|
@saveBackup = _.debounce(@saveBackup, 500)
|
||||||
|
# IE9 doesn't expose console object unless debugger tools are loaded
|
||||||
|
unless console?
|
||||||
|
window.console =
|
||||||
|
info: ->
|
||||||
|
log: ->
|
||||||
|
error: ->
|
||||||
|
debug: ->
|
||||||
console.debug = console.log unless console.debug # Needed for IE10 and earlier
|
console.debug = console.log unless console.debug # Needed for IE10 and earlier
|
||||||
|
|
||||||
setProjection: (project) ->
|
setProjection: (project) ->
|
||||||
|
|
Loading…
Reference in a new issue