Skip to content
This repository has been archived by the owner on Jun 3, 2020. It is now read-only.

Commit

Permalink
Run beaker.archives.createEventStream() at load event
Browse files Browse the repository at this point in the history
  • Loading branch information
pfrazee committed Sep 22, 2018
1 parent da580b8 commit 76d0074
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions web-apis/fg/beaker.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,13 @@ exports.setup = function (rpc) {
beaker.archives.clearDnsCache = archivesRPC.clearDnsCache
beaker.archives.getDebugLog = archivesRPC.getDebugLog
beaker.archives.createDebugStream = () => fromEventStream(archivesRPC.createDebugStream())
try {
bindEventStream(archivesRPC.createEventStream(), beaker.archives)
} catch (e) {
// permissions error
}
window.addEventListener('load', () => {
try {
bindEventStream(archivesRPC.createEventStream(), beaker.archives)
} catch (e) {
// permissions error
}
})

// beaker.history
beaker.history = {}
Expand Down

0 comments on commit 76d0074

Please sign in to comment.