Expand description
Extension contracts and captured state; the executable installs the native loader.
Structs§
- Binding
- An extension bound to a document: its package, the input it reads and what
it last prepared from it. Clones share one state; a
snapshotdoes not. - Config
- An extension as a document’s
extensions:names it: its package and what it is configured with. - Live
- An address an extension’s process answers — under its
live/, or a page under itspages/— and what answers it. - Process
- A package’s process: the long-running program devpage starts for it, and
passes the requests under the extension’s
live/address to.
Constants§
- LIVE
- The system extension that is the live session: its name under a
document’s
extensions:, and in its address.
Traits§
- Loader
- What loads an extension’s package from its bundle; the executable installs the native one.
- Package
- An extension’s package, loaded: what devpage asks, in JSON, to read its input and show its files.
Functions§
- bound
- Whether
key, aLive::key, still names a bound extension: one whose document was not loaded again with another configuration. - changed
- Whether an extension in
scopeprepared anew afterfileschanged: each whose input holds one of them, or lies in one, prepares again. A failed preparation counts as a change. - configure
- Binds the extensions
configsto the document atdoc, each package loaded from its bundle underbase, and prepares each; with them the live session, where it is on inscope, unless the document’slivesaysenabled: falsein itsconfigor names a package of its own. Nothing to bind unbinds the document. A configuration already bound inscopeis kept as it is. - for_
document - The extensions bound to the document at
doc— none when it has none. - for_
file - The extensions of the document that owns
fileinfolder— the entry document’s when none does. - imported_
module - Resolves a package-relative import the same way when collecting the module sources and when compiling them to browser addresses.
- input_
roots - The input of every extension bound in
scope, for the watcher to watch. - install_
loader - Installs
loaderas the one every package is loaded with; a second call is ignored. - live
- What answers
pathwhen it is under an extension’slive/address inscope: the bound extension and its process.Nonewhen it is no such address. - page
- The page of an extension
pathnames inscope,pages/<page>under the extension’s address: what answers it, asked forpages/<page>; the page, as its extension names it; and the file of the document it is drawn in —entrywhen that document binds the extension, else the first that does.Nonewhenpathis no extension’s page. - route
- The reply to
pathwhen it is an extension’s address inscope: a browser file the package ships, or else what the package routes it to.Nonewhen it is no extension’s. - serve_
entry - The shared session reads its project configuration from the entry document.
- serve_
live - Enables the shared live-session package for this served project.
- serve_
packages - Enables globally configured packages during loopback serving. Paths are relative to the global configuration file’s folder.