Recommit of PR #3220 from @anitagraham

- add events to clearing
- adds documentation for those events

with changes:

- removed extra parameter from <code>open</code> event
- updated docs to match current style