title: async await for image onload event trigger
body: <p>I have a weird one I can't wrap my brains around.</p>
  
  <pre><code>const load = url =&gt; {
    return new Promise( resolve =&gt; {
      const img = new Image()
      img.onload = () =&gt; resolve({ url, ratio: img.naturalWidth / img.naturalHeight })
      img.src = url
    })
  }
  </code></pre>
  
  <p>How am I supposed to use <code>async / await</code> given the onload is just a callback assignment ... I am stuck at the following:</p>
  
  <pre><code>const load = async url =&gt; {
  
      const img = new Image()
      img.src = url
      return await img.onload = () =&gt; ({ url, ratio: img.naturalWidth / img.naturalHeight })
  
      // cannot use await for img.onload obviously ..
      // nor can I put await in the onload function ... since it's not going to do anything
  
  }
  </code></pre>
  
  <p>Is it possible to solve without having to use the resolve method ? </p>