title: Is it okay to hold a reference to a canvas 2d context?
body: <p>Is it okay to hold a long-lasting reference to a canvas context (one obtained by <code>getContext('2d')</code>)? In particular, might there be issues if the canvas element is resized? If there are issues, would it improve matters to use a context obtained from a separate canvas node (as described in <a href="https://stackoverflow.com/questions/3892010/create-2d-context-without-canvas">this thread</a>) instead of one derived from the DOM?</p>
  
  <p>The reason for the question is, I need to do a lot of text metric calculations behind the scenes and I thought that maintaining a reference to a context would be a good way to do this.</p>