title: Displaying a loading spinner when drawing HTML5 canvas. Event?
body: <p>I have spent many hours searching for this, but either it's not a very common problem or my Google-fu is lacking.</p>
  
  <p>The short version is I have site with an HTML5 canvas element that is displaying large complex drawing, which means it usually takes up to 10 seconds to complete.</p>
  
  <p>How is it possible to hook into the drawing event? I can't find anything of the sorts, but it would really help user experience if a loading spinner was displayed as the canvas was being drawed. I have seen it done before, but not seen the "how".</p>
  
  <p><strong>Details for the experienced:</strong>
  I am displaying a PDF with PDFJS, and have my own viewer instead of the supplied one. It works, but sometimes it draws the PDF very slow, hence the need of a spinner.</p>