Document lifecycle events.