Support initial timeout for ajax.poll method

XMLWordPrintable

    • Type: Suggestion
    • Resolution: Fixed
    • None
    • Component/s: API - Front end
    • None
    • Environment:
      Stash 2.10.0

      In our case we'd like to use ajax.poll method (ajax.js) for one of our add-ons but we need to have possibility to start request immediately and continue polling using 'interval' option.

      In current implementation method ajax.poll uses 'interval' option for initial timeout.

      function poll(options) {
              options = $.extend({
                  pollTimeout: 60000,
                  interval: 500,
                  tick: $.noop
              }, options);
      
      // ...
      // something like options.delay it would be nice to have
      setTimeout(doPoll, options.interval);
      // ...
      }
      

              Assignee:
              Unassigned
              Reporter:
              Alexander Kuznetsov [StiltSoft]
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: