Programmatically trigger a DOM event. Useful for testing mostly.