aboutsummaryrefslogtreecommitdiff
path: root/client/js/views/registration_view.js
diff options
context:
space:
mode:
authorrr-2016-05-11 21:29:57 +0200
committerrr-2016-05-11 23:47:50 +0200
commit2a4241641c80fec036143e7335eb2dad63fad476 (patch)
tree389c49ded7faa6da98699618268ceb24c14bd456 /client/js/views/registration_view.js
parent09bc5f10f90a8b8666ed5df631261a87d3bbcb15 (diff)
client/events: improve event dispatching
This commit introduces timer-less retry system: 1. Any change to URL is going to stop listening to any messages. 2. If a message is sent and there's no handler that could pick it up, the message gets enqueued. 3. The message is sent again to the first handler that attaches itself to given event type. While in theory this is full of holes (no control over the first handler), in practice, it works quite well. Additionally, views.listenToMessages was attaching to completely wrong DOM node; this commit fixes this as well.
Diffstat (limited to 'client/js/views/registration_view.js')
-rw-r--r--client/js/views/registration_view.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/client/js/views/registration_view.js b/client/js/views/registration_view.js
index 4a3178f..bcd8c74 100644
--- a/client/js/views/registration_view.js
+++ b/client/js/views/registration_view.js
@@ -33,7 +33,7 @@ class RegistrationView {
.always(() => { views.enableForm(form); });
});
- views.listenToMessages(target);
+ views.listenToMessages(source);
views.showView(target, source);
}
}

© 2015 - 2026 Jakob L. Kreuze