When I am trying to load an external script like in the examples, I am getting CORS related errors with 0.9.21 and 0.9.19.
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="css/style.css">
<script type="text/javascript" src="js/paper-full.js"></script>
<!-- // <script type="text/javascript" src="js/paper-full-0.9.21.js"></script> -->
<script type="text/paperscript" src="js/main.js" canvas="canvas"></script>
</script>
</head>
<body>
<canvas id="canvas" resize></canvas>
</body>
</html>
Are you sure this is a paper.js issue? Maybe you are trying to load a resource from the local file system, which Chrome does not permit.
Did you try the same with Firefox? It seems to be less restrictive.
Maybe you want to take a look at this:
https://www.npmjs.com/package/http-server
I use it when testing our software on my localhost to prevent cross origin errors.
Yeah there is no way we can circumvent CORS when on the file system. You can serve the files from a local web server, or start the browser with a flag that allows it to load from the local file system:
On OSX you can also use http://anvilformac.com/ to serve a local folder through a local web-server very conveniently.
You can still force a chrome instance to allow CORS by adding the cmd line argument --disable-web-security.
Most helpful comment
Maybe you want to take a look at this:
https://www.npmjs.com/package/http-server
I use it when testing our software on my localhost to prevent cross origin errors.