Fork me on GitHub
#re-frame
<
2018-02-25
>
danielcompton20:02:53

@feihong.hsu I wouldn't expect any differences in dispatch between those two templates, that would be a bug if so. I'd be very interested to see it if there was a difference. dispatched events are handled asynchronously, the dispatch just adds it to the event queue, and tells re-frame to run the queue (0.1ms later) with goog.nexttick. dispatch-sync is a way to synchronously call an event handler, so it will be handled in the same click event callback

danielcompton21:02:38

Just to add to the complexity, Chrome has been doing some work on passing the call stack across asynchronous boundaries, including goog.nexttick, I'm not sure whether the permissions would carry across that callback as well.