Skip to content

Commit

Permalink
demo pages. WebSocket onclose event handled
Browse files Browse the repository at this point in the history
  • Loading branch information
dtaipov committed Jan 30, 2019
1 parent f922c80 commit 2664b7b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/eth_signer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,16 @@ <h6>Documentation: <a href="https://github.com/arrayio/array-io-keychain/wiki/Ho
let keychain;
web3override.Keychain.create()
.then(data => keychain = data)
.then(() => {
keychain.wsp.onClose.addListener(() => {
document.body.style.backgroundColor = null;
document.getElementById('error').style.display = 'block';
});
})
.then(() => document.body.style.backgroundColor = '#cfc')
.then(() => keychain.method({command: 'version'}))
.then(data => document.getElementById('version').innerText = data.result );

// todo process onclose WebSocket event
// keychain.ws.onclose = function() {
// document.body.style.backgroundColor = null;
// document.getElementById('error').style.display = 'block';
// };
//
document.getElementById('btn_SIGN').addEventListener('click', function() {
document.getElementById('etherscanLink').innerHTML = '';
const endpoint = document.getElementById('input-endpoint').value;
Expand Down

0 comments on commit 2664b7b

Please sign in to comment.