I wanted to know if there's a way to load a JS file, located on my computer, on my browser.
I know it's possible with Firefox with Scratchpad, but could it be with Chrome or whatever else?
I wanted to know if there's a way to load a JS file, located on my computer, on my browser.
I know it's possible with Firefox with Scratchpad, but could it be with Chrome or whatever else?
Yes, it is possible with Chrome/Chromium. You can store the file at LocalFileSystem
using webkitRequestFileSystem
and get a reference the file using FileEntry.toURL()
which returns a filesystem:
protocol URL.
Alternatively, use <input type="file">
to upload the file object or folder and URL.createObjectURL()
to reference the file as a Blob URL
.