* There's no need to poll for the modal when we have an event loop.
* Retain backwards compatibility with legacy capybara-webkit API. * Confirm dialogs are accepted by default; dialogs are dismissed. * Legacy API overrides the default action, and does not raise errors for unexpected modals.