Web main() entry point.
0.0.1
Type:
("SPAWNING"
| "RUNNING"
| "TERMINATING"
| "TERMINATED"
)
Process class. Wrapper for iframe+WebWorker untrusted code {Sandbox}. Used to spawn, control and terminate underlying WebWorker process.
Extends EventEmitter
Type: ProcessStatus
Type: ProcessStatus
ProcessStatus
Type: ProcessStatus
(ProcessStatus)
Type: {}
Type: Array<Capability>
Type: {pid: Pid, path: string, argv: Array<any>, status: ProcessStatus}
Get _Process_es information.
Array<ProcessInfo>
:
Process information array.
Type:
("spawn"
| "mount"
| "window:text"
| "window:canvas"
)
Type:
("INIT"
| "ERROR"
| "READ"
| "DATA"
| "OPEN"
| "CLOSE"
| "CHANNEL"
| "EVENT"
)
Type: {type: MessageType, id: string?, payload: (string | Object | ArrayBuffer)?, process: (Pid | null)?, path: (string | null)?, channel: Cid?}
(MessageType)
(string?)
((string | Object | ArrayBuffer)?)
((Pid | null)?)
((string | null)?)
(Cid?)
Process Sandbox is responsible for launching an untrusted process in WebWorker thread and jailing it in IFrame sandbox. This restricts what a Process can do to what is allowed to WebWorker thread (not much besides web access) and what is accessible by sending and receiving messages from the kernel (and indirectly other _Process_es).
IFrame proxy code for WebWorker. This code works in an IFrame sandbox as an intermediary between kernel and process code working in WebWorker it creates.
(string)
Origin of parent window.
(string)
Name of WebWorker inside (for tracking purposes).
(string)
Originating code path (for logging purposes).
void
Mounts a Process or internal:
handler on VFS volume.
VFS volume can be handled either by spawning a dedicated process processing messages sent to VFS paths or by handler function provided internally ba kernel.
List all mounts and handlers.
Create a mapping from one Path to another Path.
VFS will replace source part of Path with dest, every time it resolves a Path - keeping the part that does not match. This allows mapping a part of VFS tree under other Path, including shadowing already existing VFS trees.
boolean
:
Success boolean.
Creates application Window visible to the user. Handles interactions by emitting events.
Extends EventEmitter
Type: HTMLIFrameElement
Type: HTMLHeadElement
Type: HTMLStyleElement
Type: HTMLElement
Type: HTMLElement
(HTMLElement?)
(KeyboardEvent)
Type: {x: number, y: number, width: number, height: number}
Very simplistic EventEmitter.
Type: function (({} | string)): void
Copy attributes needed for a reply to a Message.
(Message)
Reply
Message
to be filled.
(Message)
Message
instance reply is a response to.
Message
:
Reply
Message
.
parse argument options
Return an argument object argv populated with the array arguments from args. argv. contains all the arguments that didn't have an option associated with them. Numeric-looking arguments will be returned as numbers unless opts.string or opts.boolean is set for that argument name. Any arguments after '--' will not be parsed and will end up in argv..
ArgV
:
argv object.
(string)
({}?)
Promise<File>
Helper function to notify a Process about new Channel creation.
(Process)
Process
object instance.
(Cid)
Channel
ID.
({})
Channel
data (process:
Pid
or path:
Path
).
(Message)
OPEN
Message
it is a reply to.
void
(string)
Promise<Process>