Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • B BrainBox
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 47
    • Issues 47
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Roberto José TORO OLMEDO
  • BrainBox
  • Issues
  • #156
Closed
Open
Issue created Oct 17, 2017 by Roberto José TORO OLMEDO@rtoOwner

Change jQuery Promises into Ecma Promises

Created by: r03ert0

Is this a feature request or a bug report?

This is an enhancement request

What is the current behaviour?

Currently brainbox uses jQuery promises, which look like this:

function foo() {
  var def = new $.Deferred();
  if(result_of_async_process_is_ok) {
    def.resolve();
  } else {
    def.reject();
  }
  return def.promise();
}

What is the expected or desired behavior?

Use standard ES promises, which look like:

functio foo() {
  var pr = new Promise(function(resolve, reject) {
    if(result_of_async_process_is_ok) {
      resolve();
    } else {
      reject();
    }
    return pr;
  });

Other than that, brainbox uses the $.when promises, which should be replaced with Promise.all([]).

Assignee
Assign to
Time tracking