VE fires several hooks via mw.hook, most importantly:
- ve.activate
- ve.activationComplete
- ve.deactivate
- ve.deactivationComplete
While it is more or less clear what these hooks signal, they have some strange edge cases, and without detailed documentation it is not clear whether this is intentional or a bug.
Especially the CSS classes added to the <html> element do not always correspond to the hook, it rarely happens that we still have ve-activating as class when ve.activationComplete fires (while in most cases the expected ve-active class is set at that point already). Also, when switching between VE and NWE, the ve.activationComplete hook is fired, but not the other ones, which isn't obvious just from the names of the hooks.