Add attaching and detaching event subscribers to the docs