Javascript File i/o

Thursday May 25th, 2000

Pete Collins from Alphanumerica and Mozilla developers have created a Javascript interface for doing file i/o in Mozilla, which will allow new Mozilla components like Alphanumerica's Crash Recovery system to function properly.

Patterned after the PHP filesystem functions, simple functions such as file read/write and directory create are supported. The code has not yet made it into the nightly build, but they expect it will get in soon.

Note from AN: There seems to be a misconception about Javascript File I/O being a security risk. It is important to clarify that this project is not opening any security holes in Mozilla. There is a difference between Javascript on the Internet and Javascript inside the application. Javascript is used inside Mozilla to create the functionality for the application. This is in contrast to any Javascript downloaded from the Internet that is used for functionality only inside a Web page. This project does not grant any access to Javascript found on the Internet. For more information about how Javascript is used inside Mozilla read more about XPCOM and XPConnect.

#44 Oh, and one other thing...

by sab39

Friday May 26th, 2000 2:48 PM

You are replying to this message

"Things like chatzilla" are actually first-class applications, in a sense. Mozilla doesn't (or at least, eventually won't) make any distinction between chatzilla and the browser itself.

Just like you can now have a "navigator only install", you'll be able to have a "mail only", "chatzilla only", "xmlterm only"... install. Of course all of these will first have to install xptoolkit, nglayout and the other fundamental stuff that they all rely on, but you won't have to install anything which corresponds to a "browser" as such.

To that extent, chatzilla and co *have* to have access to the filesystem. Imagine if another component - mail for example - couldn't access the filesystem. It wouldn't be much of a mail program if it couldn't store your mails anywhere!