ServerJS/System: Difference between revisions

Jump to navigation Jump to search
update spec according to "Show of Hands"
(→‎Show of Hands: add Ash Berlin's hands)
(update spec according to "Show of Hands")
Line 1: Line 1:
= System Interface Proposal A =
= System Interface =


All platforms must support a free variable, "system", that is an object that may contain the following attributes.  The "system" variable may be either a global variable, an argument to every module factory function, or inserted into a module scope by some other means.  "system" may be used for dependency injection in sandboxes, so it may be frozen.  Therefore, the variable must not be reassigned, or modified in interoperable modules, although it may be mutable and reassignable in particular platforms.
All platforms must support a <u>module</u>, "system", that may contain the following attributes.


If "system" contains any of the following names, they must have the corresponding meaning:
If "system" contains any of the following names, they must have the corresponding meaning:
Line 10: Line 10:
* env: an Object containing posix-style or CGI environment variables.
* env: an Object containing posix-style or CGI environment variables.
* args: an Array containing the command line arguments for the invoking arguments, not including the interpreter/engine but including the path to the program as it was executed.
* args: an Array containing the command line arguments for the invoking arguments, not including the interpreter/engine but including the path to the program as it was executed.
* fs: a file default file system root object conforming to the File System API


Any names not mentioned here or amended into this specification later should begin with "x" and a vendor-specific label as a prefix, like system.xCajaDomita.  This will permit the future standardization of additional names as needed.  Please request additional names in [[ServerJS/System/AmendmentProposals]].
Any names not mentioned here or amended into this specification later should begin with "x" and a vendor-specific label as a prefix, like system.xCajaDomita.  This will permit the future standardization of additional names as needed.  Please request additional names in [[ServerJS/System/AmendmentProposals]].


== Show of Hands ==
= Show of Hands =


arguments:
arguments:
Line 78: Line 77:
** Ash Berlin
** Ash Berlin


== Comments ==
= Comments =
 
Removed variables:
 
* fs: a file default file system root object conforming to the File System API


== Relevant Discussions ==
== Relevant Discussions ==
62

edits

Navigation menu