Type: Function
This represents the System base class, which can be extended or reinstantiated to create a custom System instance.
Example:
var clonedSystem = new System.constructor();
clonedSystem.import('x'); // imports in a custom context
Type: Function
Loads a module by name taking an optional normalized parent URL argument.
Promise resolves to the ES module namespace value.
Note: If provided, parentURL
must be a valid URL, or URL resolution may break.
Type: Function
Declaration function for defining modules of the System.register
polyfill module format.
Read more on the format at the loader polyfill page
Note: Named System.register is not supported, only anonymous definitions.
Type: Function
Resolves a module specifier relative to an optional parent URL, returning the resolved URL.
Type: Function
Deletes a module from the registry by ID.
Returns true if the module was found in the registry before deletion.
System.delete('http://site.com/normalized/module/name.js');
Type: Function
Retrieve a loaded module from the registry by ID.
System.get('http://site.com/normalized/module/name.js').exportedFunction();
Module records with an error state will return null
.
Type: Function
Determine if a given ID is available in the loader registry.
Module records that have an error state in the registry still return true
,
while module records with in-progress loads will return false
.
System.has('http://site.com/normalized/module/name.js');
Type: Function
Sets a module in the registry by ID.
System.set('http://site.com/normalized/module/name.js', {
exportedFunction: value
});
module
is an object of names to set as the named exports.
If module
is an existing Module Namespace, it will be used by reference.
Type: Function
Allows you to retrieve all modules in the System registry. Each value will be an array with two values: a key and the module.
for (const [id, ns] of System.entries()) {
console.log(id); // 'http://localhost/path-to-file.js'
console.log(ns); // { exportName: 'value' }
};