From 51e67b8c623cb68b9be2e172dffc7790da0ae288 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Fri, 18 Mar 2016 06:20:20 +0000 Subject: Refactor the front-end initialisation sequence. The front-end initialisation sequence has become quite confused. This simplifies it, makes things which must be idemtpotent explicit and renames some functions to make it clear when they run. It also avoids a situation where we were possibly installing a `domReady` function to initialise the HUD multiple times. Should be a no-op functionality wise. --- tests/dom_tests/dom_tests.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/dom_tests/dom_tests.coffee b/tests/dom_tests/dom_tests.coffee index b1d1e586..c3f4ecc1 100644 --- a/tests/dom_tests/dom_tests.coffee +++ b/tests/dom_tests/dom_tests.coffee @@ -1,6 +1,6 @@ # Install frontend event handlers. -installListeners true +installListeners() HUD.init() Frame.registerFrameId chromeFrameId: 0 @@ -28,7 +28,7 @@ commandName = commandCount = null initializeModeState = -> Mode.reset() handlerStack.reset() - initializeModes() + installModes() normalMode.setPassKeys "p" normalMode.setKeyMapping m: options: {}, command: "m" # A mapped key. -- cgit v1.2.3