17 Commits (717b36129e04e17b6715b31139ac7052d07f9f3c)

Author SHA1 Message Date
Julian Lam b88bb3cfbb feat: allow client-side hook registration chaining 3 years ago
Julian Lam 935704a83c feat: collect hook logs in order to reduce console noise, flush on ajaxify loadScript completion 3 years ago
Barış Soner Uşaklı 36aa60346b breaking: remove action:category.loaded, use action:topics.loading
action:category.loaded will not fire on infintite load of topics
4 years ago
Barış Soner Uşaklı fb363957d1 refactor: tab rules 4 years ago
Barış Soner Uşaklı 96f13e4f5d feat: #9992, hooks.one 4 years ago
Julian Lam 21359eabac feat: convert _fireStaticHook to async function (auto-refactor by vscode) 4 years ago
Julian Lam 6bc090f8bb docs: some hook deprecation notices 4 years ago
psychobunny 8ae4c30029 feat: schedule deprecation for `action:category.loaded` and `action:category.loading`. Use `action:topics.loaded/ing` instead
(or action:ajaxify.end if you are using it to check cid on page load)
4 years ago
Julian Lam d1685600d3 refactor: deprecate action:script.load, use filter:script.load instead 4 years ago
Julian Lam 1e579428e7 fix: bug where fallback window trigger was not firing if there were no hook listeners attached
... so in essence the backwards compatibility was not working at all.

closes nodebb/nodebb-plugin-composer-default#147
4 years ago
Julian Lam d0136074b6 feat: allow hook unregistration, and temporary page-based hooks
Temporary hooks automatically unregister themselves on the next ajaxify, making them perfect for in-page events.
4 years ago
Peter Jaszkowiak cc9d6fd08b chore: eslint max-len 4 years ago
Julian Lam b0f5d5a594 fix: crash on firing action hook that had no listeners registered 4 years ago
Julian Lam efff8e2ae2 fix(hooks): bug where hook firing would fail if there were no listeners 4 years ago
Julian Lam e7bd038db1 refactor(hooks): better error handling
Hook listeners can both throw and reject, and it will be handled appropriately (e.g. filters won't fail)
4 years ago
Julian Lam 412d285850 fix(hooks): fallback handling for core invocations of hooks.fire
+ .on() which is the same as .register()
4 years ago
Julian Lam 01c9b1847e feat(hooks): client-side hooks module
Similar to server-side, comes with three hook types, filter, action, and static. Behaviour also mimics server-side.
4 years ago