Expanded events beforeload, beforedom, afterdom and load