canvas-color-space
canvas-color-space copied to clipboard
Issues with ImageData extension
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.
- 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.
- The
readonly
prefix on the getImageDataSettings() operation is invalid. It should just be removed. - 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.