regl
regl copied to clipboard
Examples don't load in Safari on macOS (CORS issue)
Safari 10.0 macOS 10.11.6
The animations on the home page at regl.party load just fine. But when I go to the Examples, the "Loading..." text never goes away, animations never load, and the following console errors consistently appear:
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) https://wzrd.in/multi
[Error] SyntaxError: JSON Parse error: Unexpected identifier "Cannot" - bundle.js:5755
parse (bundle.js:5755)
downloadedModules (bundle.js:5755)
on_end (bundle.js:6106)
on_state_change (bundle.js:6056)
I am able to load the examples in Chrome on the same computer & network.
This is a bug in https://github.com/freeman-lab/regl-site
We should be running the es2020 transform on wzrd.in in order to support the es6 features like template strings.
Hmm safari 10 supports all the ES6 features we are using here. It's the JSON parsing that somehow fails.

Really weird
Something wrong with JSON encoding? That's why wzrd.in fails and returns 404.
Safari 10:
Chrome:
The body content comes from request
function containing:
//BEGIN FORM Hack
var multipart = function(obj) {
Maybe that fails in SF?
Still broken on Chrome for me.
Access to XMLHttpRequest at 'http://wzrd.in/multi' from origin 'http://regl.party' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.