Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-4588

Documentation for notification.confirm should say to pass buttonLabels as Array

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.9.0
    • None
    • None
    • None

    Description

      Compare navigator.notification.confirm and navigator.notification.prompt.

      Both APIs allow caller to specifiy buttonLabels as 4th parameter, but confirm expects a comma separated String and prompt expects an array. The parameter passing mechanism should be consistent for these similar APIs.

      It looks like the cordova.js is already handling the scenario, because it says:

      console.log("Notification.confirm(string, function, string, string) is deprecated.  Use Notification.confirm(string, function, string, array).");
      

      But the documentation for navigator.confirm is out-of-step with the code; it should be updated to say to pass Array, not String.

      Seems related to CB-1933

      Attachments

        Issue Links

          Activity

            People

              lorin.beer Lorin Beer
              dinglemouse Peter
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: