title: Detect when saveAs dialog is canceled
body: <p>Following the documentation here: <a href="https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/downloads/download" rel="nofollow noreferrer">https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/downloads/download</a></p>
  
  <pre><code>var options = {
    filename: 'dummyName.txt',
    url: 'https://some.url',
    conflictAction: 'uniquify',
    saveAs: true
  };
  var downloading = browser.downloads.download(options, function() {
    console.log('In callback');
  });
  
  console.log(downloading);
  downloading.then(function() {
    console.log('started');
  }, function() {
    console.log('failed');
  });
  </code></pre>
  
  <p>In console, I see ..</p>
  
  <pre><code>undefined
  downloading is undefined
  In callback
  Unchecked lastError value: Error: Download canceled by the user
  </code></pre>
  
  <p>How can I prevent the code inside <code>downloading.then</code> from running if user canceled the save on dialog?</p>