Got the idea from http://stackoverflow.com/questions/2490825/how-to-trigger-event-in-javascript

Only IE9 & 10 use createEvent (amongst modern browsers), so it seemed logical to follow this path.