use createEvents and initEvent instead of new MouseEvent