4 ms·
Good idea. I'll add "fetch files from other domains" to the TODO list, as either it's own call, or maybe do something like allowing "http://" http://" protocols
by brent_noorda 12y ago
Good idea. I'll add "fetch files from other domains" to the TODO list, as either it's own call, or maybe do something like allowing "http://" http://" protocols in the SLFSRV.read() method.
cross-origin issues would probably prevent some xmlhttprequest calls directly. Meanwhile, here is one current hack you could use to read files from other domains (although it assumes that "curl" is installed):
SLFSRV.exec( { program:'curl', args:['curl','https://news.ycombinator.com/' https://news.ycombinator.com/'] },
function(ret) {
console.log(ret.stdout);
}
);
- robbrown451 12y agoSounds great. Yeah I had noticed that exec function might work. :) I've downloaded the binary and am playing with it....holy crap I love this thing. It's perfect for some stuff I'm currently working on. I'm glad it is so simple, although I'm sure there are some things that could be added eventually to make it a bit better. (sandboxing and various other permissions things come to mind)