diff options
Diffstat (limited to 'xP')
-rw-r--r-- | xP/public/xP.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/xP/public/xP.js b/xP/public/xP.js index 42a7a55..eb27b46 100644 --- a/xP/public/xP.js +++ b/xP/public/xP.js @@ -85,7 +85,8 @@ class RelayRpc extends EventTarget { if (typeof e.event !== 'string') throw "Invalid event tag" - this.dispatchEvent(new CustomEvent(e.event, {detail: e})) + this.dispatchEvent(new CustomEvent( + e.event, {detail: {eventSeq: message.eventSeq, ...e}})) // Minor abstraction layering violation. m.redraw() @@ -153,6 +154,10 @@ rpc.addEventListener('close', event => { m.redraw() }) +rpc.addEventListener('Ping', event => { + rpc.send({command: 'PingResponse', eventSeq: event.detail.eventSeq}) +}) + rpc.addEventListener('BufferUpdate', event => { let e = event.detail, b = buffers.get(e.bufferName) if (b === undefined) { |