Programmatically trigger a DOM event