we using fabric.js 1 tshirt design portal. when use canvas.todataurl('image/png') on button click gives me "dom exception 18" on google chrome only. working on firefox.
what way save canvas png supports on chrome ?
you experiencing chrome security error occurs when try use todataurl save image retrieved domain.
this "affectionately" know cors error (cross-origin resource sharing).
chrome doing prevent hacker taking image of banking login screen , using steal banking password.
you can satisfy chrome originating image you're trying save on same domain todataurl call.
alternatively, can set server that's hosting image allow cross-origin requests.
here's blog article on how that:
Comments
Post a Comment