ExtensionManager

Manager~ ExtensionManager

Extension manager.

Constructor

new ExtensionManager()

Source:

Methods

_checkExtensionLoadingOrderById(extensionId, requireStack, graph)

Source:

Get loading order of the extension with given id.

Parameters:
Name Type Description
extensionId string

The extension id.

requireStack Array.<Object>

Require stack.

graph Graph

Load order.

_checkExtensionUnloadingOrderById(extensionId, graph)

Source:

Get unloading order of the extension with given id.

Parameters:
Name Type Description
extensionId string

Extension ID.

graph Graph

Unlaod order.

addInstance(id, info, instance)

Source:

Add an extension.

Parameters:
Name Type Description
id string

Extension id.

info ExtensionInfo

Extension info.

instance Extension

Extension instance.

exist(id)

Source:

Check if an extension existed.

Parameters:
Name Type Description
id string

Extension id.

getExtensionLoadOrder(extensions) → {Array.<Object>}

Source:

Get the correct loading order.

Parameters:
Name Type Description
extensions Array.<string>

The list of extension ID.

Returns:
Type
Array.<Object>

getExtensionUnloadOrder(extensions)

Source:

Get the correct unloading order.

Parameters:
Name Type Description
extensions Array.<string>

The list of extension ID.

getInfo(id) → {ExtensionInfo}

Source:

Get an extension info.

Parameters:
Name Type Description
id string

Extension id.

Returns:
  • Extension info.
Type
ExtensionInfo

getInstance(id) → {Extension}

Source:

Get an extension instance.

Parameters:
Name Type Description
id string

Extension id.

Returns:
  • Extension instance.
Type
Extension

loadExtensionsWithMode(extensions, vmCallback)

Source:

Load all the extensions given.

Parameters:
Name Type Description
extensions Array.<Object>

The list of extension ID.

vmCallback function

Load vm extension.

removeInstance(id)

Source:

Remove an extension.

Parameters:
Name Type Description
id string

Extension id.

unloadExtensions(extensions)

Source:

Unload all the extensions given.

Parameters:
Name Type Description
extensions Array.<string>

The list of extension ID.