cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From BigstickCarpet <...@git.apache.org>
Subject [GitHub] cordova-plugin-dialogs pull request: Added support for the new "br...
Date Thu, 11 Dec 2014 19:52:21 GMT
Github user BigstickCarpet commented on a diff in the pull request:

    https://github.com/apache/cordova-plugin-dialogs/pull/46#discussion_r21704134
  
    --- Diff: www/browser/notification.js ---
    @@ -0,0 +1,94 @@
    +// Platform: browser
    +window.navigator.notification = window.navigator.notification || {};
    +
    +module.exports.alert = window.navigator.notification.alert = function(message, callback)
{
    +    // `notification.alert` executes asynchronously
    +    setTimeout(function() {
    +        window.alert(message);
    --- End diff --
    
    You're correct that all JavaScript code is blocked while the alert is displayed.  But
the `setTimeout` at least keeps things as consistent as possible by displaying the alert asynchronously,
so the calling code runs in the correct order


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Mime
View raw message