code: function createFetchPromise(slot, listenersProperty, listenerID, listBindingID, onComplete) {
                      if (slot.item) {
                          return new Promise(function (complete) {
                              if (onComplete) {
                                  onComplete(complete, slot.item);
                              } else {
                                  complete(slot.item);
                              }
                          });
                      } else {
                          var listener = {
                              listBindingID: listBindingID,
                              retained: false
                          };
  
                          if (!slot[listenersProperty]) {
                              slot[listenersProperty] = {};
                          }
                          slot[listenersProperty][listenerID] = listener;
  
                          listener.promise = new Promise(function (complete, error) {
                              listener.complete = (onComplete ? function (item) {
                                  onComplete(complete, item);
                              } : complete);
                              listener.error = error;
                          }, function () {
                              // By now the slot might have been merged with another
  
                              while (slot.slotMergedWith) {
                                  slot = slot.slotMergedWith;
                              }
  
                              var fetchListeners = slot[listenersProperty];
                              if (fetchListeners) {
                                  delete fetchListeners[listenerID];
  
                                  // See if there are any other listeners
                                  if (Object.keys(fetchListeners).length > 0) {
                                      return;
                                  }
                                  delete slot[listenersProperty];
                              }
                              releaseSlotIfUnrequested(slot);
                          });
  
                          return listener.promise;
                      }
                  }
docs: Fetch Promises