Ops... now the event 'beforeDraw' works

sorry... miss that.  The context need to be created before.
See if you agree with the changes (no $html var).