cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
CalinZBaenen
New member
Status: New idea

See: Suggestion: You should be able to load module-scripts in the file:// protocol.

I believe JavaScript modules should be allowed in the file: protocol because they allow code to be... modular.
It is very helpful, and, in some cases, important, to split code up into smaller units which later come together as a whole.

Unfortunately, in the file: protocol, where a lot of a newcoming web-developers will be experimenting with stuff, JavaScript modules aren't allowed (due to a CORS error).

I myself have faced this problem where I wanted to use modules, but I had to suck it up and put everything in one file.
In addition to my own account, there are other people who have commented on my Issue that share the same sentiment.

Thank you for reading; I hope I will see some support for this suggestion.
Cheers.

3 Comments
Status changed to: New idea
Jon
Community Manager
Community Manager

Thanks for submitting an idea to the Mozilla Connect community! Your idea is now open to votes (aka kudos) and comments.

quinten
New member

I am also in favor of this idea. However it would be great if it only loaded modules from the local filesystem in that case and not from some untrusted remote source. Or maybe some permission needs to be granted first.

CalinZBaenen
New member

@quinten


However it would be great if it only loaded modules from the local filesystem in that case and not from some untrusted remote source.

It would be a tad strange, since you can already use a <script> that pulls from anywhere, but I like the concern and am not opposed to that.