whenDOMUpdated = () => {
    if (renderTaskPromise) {
      return renderTaskPromise;
    }
    renderTaskPromise = new Promise(resolve => {
      renderTaskPromiseResolve = resolve;
      window.requestAnimationFrame(() => {
        if (invalidatedWebComponents.isEmpty()) {
          renderTaskPromise = undefined;
          resolve();
        }
      });
    });
    return renderTaskPromise;
  }
return a promise that will be resolved once all invalidated web components are rendered