Search code examples
javascriptcanvaspaperjs

Paperjs loading external Javascript file for Canvas


Error message

Loaded external script linking to My canvas but I'm getting this Error.

But when i use

python SimpleHttpServer

Module it works fine.

<script type="text/paperscript" src="js/welcome_canvas.js" canvas="welcome-canvas"></script>

Solution

  • It is CORS(Cross-origin resource sharing) ERROR, not a bug. Your method python SimpleHttpServer is one of the method which bypass CORS ERROR. Paper.js external file will not load might help you.