try domcontentloaded event