So, if i understand well, Hook system is like a function/method wrapping, to chain them. Secure hooking is the same except this is official (so, secure) code. Allowing to chain independent-from-main-handler hooked function, that wouldn't be tainted if your main handler is tainted... am i right ?
I see the interest of it.
What i don't understand is why the api seems to be incomplete or just minimal. Typically, Hooking a function is like Wrapping the main handler or function to add code parts.
Blizzard could decide to make hook and scripts separated, like making a pre-hooks (that are, in facts, just methods/functions overwriting/overloading atm), script and hooks phases, but this is just a wrapping/replacing process.
But, what is really bad, is when you want to hook a default behavior for an advanced/enhanced frame for exemple, but still want to allow user to add its own behavior (without overwriting the default one). (What i want to do is to provide advanced frames in a Lib, allowing any coder to add their own complexity)
The only way i see is to Hook the script as default (it will be registered as the script handler) and hook the function SetScript to make it hook your default behavior when changing script. But it is so laborious... I was wondering if there was a cleaner way..?
I hope i made it understandable, as it is a really technical feature, and english is not my primary language.