Window.confirm without native code?

Is this one of those things that can only be called if the event loop began with a user input? If so, I believe the reason ports do not work at the moment is that the current releases uses requestAnimationFrame before showing things, thereby cutting the event provenance needed for this sort of thing. Is that correct?

I modified virtual-dom to allow people to respond directly to user input events. That means:

  1. The issue where changing <input value="blah"> too quickly can get lost will be gone. It will be synchronous now. The idea being that user inputs like typing are slow enough that it’s fine if it is not synced with animation frames.
  2. If people need to do “only on user event” actions, they can do it through ports.

That required a breaking change in virtual-dom to on that will come out with 0.19. It is just a bit more flexible (to cover “passive events” as well) so any existing uses should need only tiny tweaks.

Anyway, I think that handles your other question as well, but I’m not 100% certain I diagnosed the root problem correctly in your specific cases. If it does handle the other question as well, can someone make a note over there?

4 Likes