canvas-color-space icon indicating copy to clipboard operation
canvas-color-space copied to clipboard

Issues with ImageData extension

Open weinig opened this issue 3 years ago • 0 comments

The current proposal has the following extension to the ImageData interface:

partial interface ImageData {
  constructor(unsigned long sw, unsigned long sh, optional ImageDataSettings);
  constructor(ImageDataArray data, unsigned long sw, unsigned long sh, optional ImageDataSettings);
  readonly ImageDataSettings getImageDataSettings();
  readonly attribute ImageDataArray data;
};

There are few issues here.

  1. Partial interfaces cannot define constructors (though I don't exactly remember why this is a requirement, the grammar does not allow it). I think you will want to define this by completely re-declaring the ImageData interface.
  2. The readonly prefix on the getImageDataSettings() operation is invalid. It should just be removed.
  3. The type ImageDataArray appears in two places and is undefined. This was probably from an earlier draft where non-8-bit backing stores were supported but should now be removed.

weinig avatar Apr 30 '21 15:04 weinig