Add plugin options (#3922)

* Adds a plugin through options

* Fix requires

* Fix pr comments
This commit is contained in:
alschmiedt
2020-05-29 13:22:25 -07:00
committed by GitHub
parent afba82222e
commit 00df97a59d
5 changed files with 88 additions and 4 deletions

View File

@@ -110,6 +110,8 @@ Blockly.Options = function(options) {
var renderer = options['renderer'] || 'geras';
var plugins = options['plugins'] || {};
/** @type {boolean} */
this.RTL = rtl;
/** @type {boolean} */
@@ -174,6 +176,12 @@ Blockly.Options = function(options) {
* @type {Blockly.Workspace}
*/
this.parentWorkspace = options['parentWorkspace'];
/**
* Map of plugin type to name of registered plugin or plugin class.
* @type {!Object.<string, (function(new:?, ...?)|string)>}
*/
this.plugins = plugins;
};
/**