Open saschanaz opened 7 years ago
Yeah, it's a good idea, it just needs implementer interest. @junov? @grorg? Not sure about who from Mozilla/Microsoft works on canvas stuff.
I'm told @nical or @mstange can help decide for Mozilla.
(Instead of overloading, should we go with blob()
just as Response
does?)
This was discussed before. For OffscreenCanvas, because this is a new interface, we did not have to worry about backwards compat, so we did a complete reboot of toBlob. We made it promise-based, and we replaced the "any... arguments" with a dictionary. To avoid confusion with the existing toBlob, it got named convertToBlob. The idea was to use OffscreenCanvas as a proving ground for convertToBlob, and copy-paste it to HTMLCanvasElement once there is proven demand.
The idea was to use OffscreenCanvas as a proving ground for convertToBlob, and copy-paste it to HTMLCanvasElement once there is proven demand.
This sounds good to me.
Previously #379 discussed about this but is closed because of Chrome implementation.
I think an overload to return Promise is still doable, what do you think?