Changed initializer to the customevent on domcontentloaded