-
-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fetch API cannot load #23
Comments
I read your code and I use the serve command, then all works well hahaha, the FAQ section coves that part, but I think is a relevant piece for your main explanation, thanks a lot, you help me to make a well documented project :D |
I hoped that https://yaqwsx.github.io/Pinion/diagramWalkthrough/#testing-the-diagram covers it. Do you have a proposal for reasonable improvement? |
Oh well I don't read that part (I mean the testing part confuse me with testing like test files and coverage you know), that's my fault, but if I could make some improvement to avoid the browsers behaviur I suggest to embed the spec.json file inside the js file or optionally create the spec.json in a javascript file as a json variable that the pinion.js could recover it properlly througth the HTML importation, it's something ugly but it could be work without any server, with this feature the HTML site will be cross-platform (actually I need the pinion cli for serve the site as http server) |
Embedding the JSON file might be an option easy to add but it does not solve the problem with cross-origin image fetching. |
The image fetching will be still working well, you're using the img HTML element for image fetching, the problem is at the spec.json file, you're using the fetch API, fetch always works well using a http server, but if you can run as a simple html.. fetch not works, embedding I think is an interesting solution, if you want expose the spec.json for no obfuscation reasons, you can use it as a javascript file and loading before pinion.js in your template.html |
Chrome console output:
I think you use the
spec.json
file as a file structure it's great but recently when I try this library the browsers (firefox and chrome) have the same problem, it is a normal beahviur or maybe I wrong?.That's my
template.html
script configuration:Thanks and nice library :D.
The text was updated successfully, but these errors were encountered: