I want to save my canvas to a img. I have this function:
function save() {
document.getElementById(\"canvasimg\").style.border = \"2px solid\";
var d
Just as a build on @markE's answer—if you want to create a local server. You won't have this error on a local server.
If you have PHP installed on your computer:
php -S localhost:3000 ← Notice the capital 'S'If you have Node.js installed on your computer:
npm init -ynpm install live-server -g or sudo npm install live-server -g on a maclive-server and it should automatically open up a new tab in the browser with your website open.Note: remember to have an index.html file in the root of your folder or else you might have some issues.