0

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>

2 Answers2

0

The problem is in ordinary you can't use ajax-requests for local files because of security politics.

But you can setup flag for Google Chrome which allow you do this How to launch html using Chrome at "--allow-file-access-from-files" mode?

Community
  • 1
  • 1
br3t
  • 1,548
  • 2
  • 17
  • 23
0

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.

Community
  • 1
  • 1
sapics
  • 972
  • 6
  • 22