Error loading JavaScript in SAFE app

@bochaco

Having figured out a workaround to this bug I can finally confirm that that is the solution.

When loading the XOR-URL of index.html in SAFE Browser, the contents of the JS file are reported to be the same as index.html, generating the syntax error.

When loading the XOR-URL of the FilesContainer containing index.html, the contents of the JS file are as expected.

I would consider the file handling when directly visiting index.html to be a bug in SAFE Browser. I briefly searched the repo’s issues and did not find it reported. Please tell me if I missed it.

Moreover, FWIW having read the entire SAFE CLI user guide I believe additional documentation would be helpful. A table describing the default handling of the various container types by official SAFE programs would be helpful.

For example, the behavior of SAFE Browser to automatically retrieve index.html of a FilesContainer.
The documentation contains:

e.g. the SAFE Browser would be automatically fetching the index.html file from it and rendering the website to the user.

While the behavior is intuitive and reasonable it should be directly and explicitly documented. If it is documented elsewhere, perhaps in a more general SAFE architectural document, that should be linked to.