docs: function(traces) {
        if (tr.isHeadless)
          throw new Error('Cannot use this method in headless mode.');
  
        var overlay = tr.ui.b.Overlay();
        overlay.title = 'Importing...';
        overlay.userCanClose = false;
        overlay.msgEl = document.createElement('div');
        overlay.appendChild(overlay.msgEl);
        overlay.msgEl.style.margin = '20px';
        overlay.update = function(msg) {
          this.msgEl.textContent = msg;
        }
        overlay.visible = true;
  
        var promise =
            tr.b.Task.RunWhenIdle(this.createImportTracesTask(overlay, traces));
        promise.then(
            function() { overlay.visible = false; },
            function(err) { overlay.visible = false; }
        );
        return promise;
      }