Add event toObject.