Skip to content

Commit

Permalink
feat(multiApp): support handling multiple apps
Browse files Browse the repository at this point in the history
BREAKING CHANGE:
Needs latest version of the debugger, 0.43 or higher
  • Loading branch information
christianalfoni committed Apr 10, 2016
1 parent 57971df commit 5a9807e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module.exports = function Devtools () {
var disableDebugger = false
var willKeepState = false
var APP_ID = String(Date.now())
var VERSION = 'v2'
var VERSION = 'v3'
var isAwaitingFrame = false
var nextSignalInLine = 0

Expand Down Expand Up @@ -194,7 +194,15 @@ module.exports = function Devtools () {
}

window.addEventListener('cerebral.dev.debuggerPing', function () {
initialize()
var event = new CustomEvent('cerebral.dev.cerebralPong', {
detail: JSON.stringify({
type: 'init',
app: APP_ID,
version: VERSION,
data: getInit()
})
})
window.dispatchEvent(event)
})

window.addEventListener('cerebral.dev.toggleKeepState', function () {
Expand Down

0 comments on commit 5a9807e

Please sign in to comment.