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
Merge pull request #4911 from shadowhand/restore-clearing-events

Recommit of PR #3220 from @anitagraham