Issue type
Feature request
Description of new feature
When using image export functions like cy.png(), it would be nice to use canvas.toBlob() if the browser has the function available.
- Chrome (50+), though mobile may be limited
- Firefox (25+)
- Safari, though mobile may be limited
- Edge (possibly supported, partially supported by
canvas.msToBlob())
- IE (partially supported by
canvas.msToBlob()
Note that this would require new API, as canvas.toBlob() is asynchronous, whereas cy.png() and cy.jpg() are synchronous: cy.png({ output: 'blob-promise' })
Motivation for new feature
These items would be nice, but it seems that the browsers don't actually provide these benefits in practice:
- Faster speed for downloads than using a base 64 export as a intermediary format.
- Bigger exported images (file size). Base 64 URIs have different size limitations on different browsers.
These items are confirmed benefits:
- Non-blocking blob generation. This allows for keeping the UI responsive while the download is happening in the background.
Issue type
Feature request
Description of new feature
When using image export functions like
cy.png(), it would be nice to usecanvas.toBlob()if the browser has the function available.canvas.msToBlob())canvas.msToBlob()Note that this would require new API, as
canvas.toBlob()is asynchronous, whereascy.png()andcy.jpg()are synchronous:cy.png({ output: 'blob-promise' })Motivation for new feature
These items would be nice, but it seems that the browsers don't actually provide these benefits in practice:
These items are confirmed benefits: