kotlinx-browser
kotlinx-browser copied to clipboard
Uint8ClampedArray declaration unusable
org.khronos.webgl.Uint8ClampedArray getter and setter declarations use Byte. Which means assigning values over 127 to it is not trivial. Also the values obtained from it violate the Byte contract
Besides one could argue that it is not a "real" array. Assigning values outside of 0..255 range is completely normal for it.
This case is important, because it is used for the canvas manipulation: https://developer.mozilla.org/en-US/docs/Web/API/ImageData/data
More information here: https://youtrack.jetbrains.com/issue/KT-24583