How to run your code before/after functions (PreHook/PostHook)

From ESOUI Wiki

Revision as of 14:14, 9 February 2020 by Baertram (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

There do exist some ZOs functions to "hook" into functions or eventhandlers like "OnMouseUp" of other controls/functions.
They are either Pre-Hooks (run before the original function and able to suppress the original code):
ZO_PreHook
ZO_PreHookHandler

Or Post-Hooks (run after the original function):
SecurePostHook
ZO_PostHookHandler

Information about "secure": If you isnert your code into e.g. the inventory and your code get's executed before the inventory is "securely" build,
it may raise error messages as the secure environment got tainted by your code.
That's why ZOs also added the SecurePostHook in order to apply your code after their code was run.

Please check this link for additional information:
[1]

Personal tools
Namespaces
Variants
Actions
Menu
Wiki
Toolbox