plugin.register

register(plugin: BasePlugin, name: string, args: unknown) → {}

Register a plugin.

// register a new plugin
me.plugin.register(TestPlugin, "testPlugin");
// the `testPlugin` class instance can also be accessed through me.plugin.cache
me.plugin.cache.testPlugin.myfunction ();
Parameters:
Name Type Attributes Default Description
plugin BasePlugin

Plugin object to instantiate and register

name string

<optional>

plugin.constructor.name

a unique name for this plugin

args unknown

<optional>

all extra parameters will be passed to the plugin constructor

Returns:
Type Description
Powered by webdoc!