cdeckard 4 years ago in iPad • updated by Alexander Blach (Developer) 4 years ago • 5
This project works under safari on my Mac.
intuitive software this not is
Customer support service by UserEcho
Can you please send me the project by email to email@example.com so I can have a look at it?
You can also try to run it through the HTML validator at https://validator.w3.org
<script type=“module” src=“./myScript.js”></script>
The ‘myScript.js’ file has es6 import directives.
Are you using WebKit to render html? Under OSX, safari requires a webserver for es6 modules; otherwise it throws errors on the console. However, I don’t get any output on the Textastic js console .. . .
Textastic uses WKWebView which is the same WebKit engine that is used by Safari.
WebKit does support ES6 modules in the latest iOS versions. Also, Textastic does run a local web server.
If you send me sample project that doesn't work, I can have a look at it.
Alexander, thanks for the info. I made a quick test project, and the “dependency” chain seems to be working ok. Now, my guess is that it’s because the files aren’t on the local file system (I created files via Textastic on the local file system for the test project). The project (that is not working) is in my Dropbox. I’m able to open the files in Textastic, but my guess is that _import_ directives don’t know where to “look” for the file.
I say this because the .css file isn’t having an effect. The two relevant lines are:
<link rel=“stylesheet” type=“text/css” href=“./diagrama.css”>
<script type=“module” src=“./diagrama.hs”></script>
I have both the linked files open in Textastic (by Using Open>Browse>Dropbox).
(FWIW, I’m unable to copy from Textastic and paste into the forum text editor via safari/iPad — also I lose the cursor in this text editor when I change focus)
I did take a look at this document:
From what I gather from the above linked document, it should work. Thoughts?
when you use the "Open…" command to open a file from Dropbox, Textastic only has access to that single file. It cannot access other files in Dropbox. Even if you open both files, Textastic does not know that they are from the same location.
Please use the built-in Dropbox client instead to download your project to "Local Files" or "iCloud". Then the preview will work as expected.
This is also explained in the document you linked to:
Have a look at the following topics in the manual to see how you can download files from Dropbox:
Sorry that I didn't know right away what was going on.