ServerJS/Modules/SecurableModules: Difference between revisions

Jump to navigation Jump to search
redacted "global"
(→‎Module Context: added the normative clauses for adding "global" to modules.)
(redacted "global")
Line 12: Line 12:
# In a module, there is a free variable called "exports", that is an object that the module may add its API to as it executes.
# In a module, there is a free variable called "exports", that is an object that the module may add its API to as it executes.
# modules must use the "exports" object as the only means of exporting.
# modules must use the "exports" object as the only means of exporting.
# In a module, there is a free variable "global", that is the global object.
## The "global" object must contain all of the standard JavaScript primordial objects (including Object, Array, String, Date, and Math)
## "global" may be frozen in secure sandboxes
## "global" and its contents must be identical in all modules from a given sandbox.
## "global" and its contents must be identical in all modules for all secure sandboxes.
## "global" and its contents must be identical in all modules for all permissive sandboxes.


=== Module Identifiers ===
=== Module Identifiers ===
171

edits

Navigation menu