I'm getting this error when I try to load remote image and call toDataURL in the background js code file.
SecurityError: The operation is insecure.
I tried playing with CORS but it doesn't helped. Any solution or this? Btw this code works fine in Chrome extension.