From bfee98b26868b82ea069c2cd2dbac4190916f701 Mon Sep 17 00:00:00 2001 From: reverend Date: Sun, 17 Jan 2021 19:29:35 +0100 Subject: [PATCH] Removing old technic --- components/00_Global/_selectorHook.styl | 32 ------------------------- 1 file changed, 32 deletions(-) delete mode 100644 components/00_Global/_selectorHook.styl diff --git a/components/00_Global/_selectorHook.styl b/components/00_Global/_selectorHook.styl deleted file mode 100644 index 4c4e1ac..0000000 --- a/components/00_Global/_selectorHook.styl +++ /dev/null @@ -1,32 +0,0 @@ -_thrown_hooks = {} -_caught_hooks = {} - -RV-Utils__Hook--throw(name, callback) - if name in _thrown_hooks - hook = _thrown_hooks[name] - else - hook = {} - - hook[selector()] = callback - _thrown_hooks[name] = hook - -RV-Utils__Hook--catch(name, context) - if selector() in _caught_hooks - _catches = _caught_hooks[selector()] - else - _catches = {} - _catches[name] = context - _caught_hooks[selector()] = _catches - - for name, hook in _thrown_hooks - if selector() in hook - hook[selector()](context) - -_generate_hooks() - for catched_selector, catches in _caught_hooks - for name, context in catches - if name in _thrown_hooks - hook = _thrown_hooks[name] - for thrown_selector, callback in hook - {thrown_selector}{catched_selector} - callback(context) \ No newline at end of file