Because the IDL parser does not allow for constructor overloads to be hidden behind a flag, we created factory methods on the ImageData interface.
These should have been static to avoid having to create a bogus ImageData object. But even better would be to put them on CRC2D and OCRC2D, with the other versions of createImageBitmap. Also, by default, createImageData should use the bit depth and color space of the rendering context it was called on. That should apply even for the existing versions of createImageBitmap. This is the behavior specified in the proposal.
Comment 1 by junov@chromium.org
, Apr 9 2017