Removing old technic
This commit is contained in:
parent
2721b55e84
commit
bfee98b268
@ -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)
|
|
Loading…
Reference in New Issue
Block a user