From dfd11eaf8ea99518e5c75114a5cd81506ae15b39 Mon Sep 17 00:00:00 2001 From: Dan Hardman Date: Mon, 18 Sep 2017 11:34:32 +0100 Subject: [PATCH] Rename on(), off() functions to watch(), ignore() I've only renamed the fields on the returned singleton for now to keep things simple, but I think `on()` and `off()` functions don't make sense without an attributed action. Typically you'd get `on('click',...)` for example. This just makes things clear that you're setting up a watcher/listener on the CSS selector. --- src/sentinel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sentinel.js b/src/sentinel.js index 977085f..0bc8757 100644 --- a/src/sentinel.js +++ b/src/sentinel.js @@ -160,7 +160,7 @@ function animationStartHandler(ev) { // return singleton object return { - on: onFn, - off: offFn, + watch: onFn, + ignore: offFn, reset: resetFn };