JS.dispatch_event is now fully tested